Skip to content

Commit

Permalink
add objective-c example project
Browse files Browse the repository at this point in the history
  • Loading branch information
metinkilicaslan committed Oct 2, 2018
1 parent eeae84a commit aebd6f4
Show file tree
Hide file tree
Showing 16 changed files with 1,034 additions and 35 deletions.

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions MKToolTip-Example-Objc/MKToolTip-Example-Objc/AppDelegate.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// AppDelegate.h
// MKToolTip-Example-Objc
//
// Created by Metin Kılıçaslan on 2.10.2018.
// Copyright © 2018 Metin Kilicaslan. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;


@end

51 changes: 51 additions & 0 deletions MKToolTip-Example-Objc/MKToolTip-Example-Objc/AppDelegate.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
//
// AppDelegate.m
// MKToolTip-Example-Objc
//
// Created by Metin Kılıçaslan on 2.10.2018.
// Copyright © 2018 Metin Kilicaslan. All rights reserved.
//

#import "AppDelegate.h"

@interface AppDelegate ()

@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
return YES;
}


- (void)applicationWillResignActive:(UIApplication *)application {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
}


- (void)applicationDidEnterBackground:(UIApplication *)application {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}


- (void)applicationWillEnterForeground:(UIApplication *)application {
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
}


- (void)applicationDidBecomeActive:(UIApplication *)application {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}


- (void)applicationWillTerminate:(UIApplication *)application {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}


@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "83.5x83.5",
"scale" : "2x"
},
{
"idiom" : "ios-marketing",
"size" : "1024x1024",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14313.18" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="HdV-CG-uO2">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14283.14"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="345-lQ-Gdb">
<objects>
<viewController id="kPJ-aV-3qU" customClass="ViewController" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="mnv-yY-PUo">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="O1g-wx-AC4">
<rect key="frame" x="299" y="537" width="46" height="30"/>
<state key="normal" title="Button"/>
<connections>
<action selector="button2Tapped:" destination="kPJ-aV-3qU" eventType="touchUpInside" id="uRZ-2y-xoP"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vRn-up-qkM">
<rect key="frame" x="100" y="607" width="46" height="30"/>
<state key="normal" title="Button"/>
<connections>
<action selector="button3Tapped:" destination="kPJ-aV-3qU" eventType="touchUpInside" id="icK-pP-NL4"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ZkX-6Y-Unl">
<rect key="frame" x="30" y="164" width="46" height="30"/>
<state key="normal" title="Button"/>
<connections>
<action selector="button1Tapped:" destination="kPJ-aV-3qU" eventType="touchUpInside" id="xvF-Ie-qVe"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="ZkX-6Y-Unl" firstAttribute="leading" secondItem="deQ-1O-WVa" secondAttribute="leading" constant="30" id="7Zr-PD-3eN"/>
<constraint firstItem="deQ-1O-WVa" firstAttribute="bottom" secondItem="vRn-up-qkM" secondAttribute="bottom" constant="30" id="Klf-We-uft"/>
<constraint firstItem="deQ-1O-WVa" firstAttribute="bottom" secondItem="O1g-wx-AC4" secondAttribute="bottom" constant="100" id="Z85-yz-4Y1"/>
<constraint firstItem="vRn-up-qkM" firstAttribute="leading" secondItem="deQ-1O-WVa" secondAttribute="leading" constant="100" id="mFk-JH-Mbm"/>
<constraint firstItem="deQ-1O-WVa" firstAttribute="trailing" secondItem="O1g-wx-AC4" secondAttribute="trailing" constant="30" id="yBi-St-cCg"/>
<constraint firstItem="ZkX-6Y-Unl" firstAttribute="top" secondItem="deQ-1O-WVa" secondAttribute="top" constant="100" id="zzT-L8-rnW"/>
</constraints>
<viewLayoutGuide key="safeArea" id="deQ-1O-WVa"/>
</view>
<navigationItem key="navigationItem" id="q6r-jy-Bi8">
<rightBarButtonItems>
<barButtonItem systemItem="add" id="0X6-Eg-zfy"/>
<barButtonItem systemItem="bookmarks" id="O5H-LP-Egx">
<connections>
<action selector="barButton1Tapped:" destination="kPJ-aV-3qU" id="VyK-Tz-vRD"/>
</connections>
</barButtonItem>
</rightBarButtonItems>
</navigationItem>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="UGs-nM-0Lm" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2052" y="-564.46776611694156"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="BBj-WD-13L">
<objects>
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="HdV-CG-uO2" sceneMemberID="viewController">
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="Jq0-uJ-px7">
<rect key="frame" x="0.0" y="20" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<nil name="viewControllers"/>
<connections>
<segue destination="kPJ-aV-3qU" kind="relationship" relationship="rootViewController" id="JV7-nc-JLD"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="z6H-Im-aIH" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1112.8" y="-564.46776611694156"/>
</scene>
</scenes>
</document>
45 changes: 45 additions & 0 deletions MKToolTip-Example-Objc/MKToolTip-Example-Objc/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
15 changes: 15 additions & 0 deletions MKToolTip-Example-Objc/MKToolTip-Example-Objc/ViewController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// ViewController.h
// MKToolTip-Example-Objc
//
// Created by Metin Kılıçaslan on 2.10.2018.
// Copyright © 2018 Metin Kilicaslan. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface ViewController : UIViewController


@end

Loading

0 comments on commit aebd6f4

Please sign in to comment.