Commit 6faf530f5213773018f6f966c3524f8d9f276ab9

Authored by bryan ago
1 parent 65fcfbde99
Exists in master

First Commit

Showing 4 changed files with 299 additions and 4 deletions Side-by-side Diff

PikiDeepLinkTester.xcodeproj/xcuserdata/dongsoolee.xcuserdatad/xcschemes/PikiDeepLinkTester.xcscheme View file @ 6faf530
... ... @@ -5,6 +5,22 @@
5 5 <BuildAction
6 6 parallelizeBuildables = "YES"
7 7 buildImplicitDependencies = "YES">
  8 + <BuildActionEntries>
  9 + <BuildActionEntry
  10 + buildForTesting = "YES"
  11 + buildForRunning = "YES"
  12 + buildForProfiling = "YES"
  13 + buildForArchiving = "YES"
  14 + buildForAnalyzing = "YES">
  15 + <BuildableReference
  16 + BuildableIdentifier = "primary"
  17 + BlueprintIdentifier = "97139A2C1CACEB6600B3E1CB"
  18 + BuildableName = "PikiDeepLinkTester.app"
  19 + BlueprintName = "PikiDeepLinkTester"
  20 + ReferencedContainer = "container:PikiDeepLinkTester.xcodeproj">
  21 + </BuildableReference>
  22 + </BuildActionEntry>
  23 + </BuildActionEntries>
8 24 </BuildAction>
9 25 <TestAction
10 26 buildConfiguration = "Debug"
... ... @@ -13,6 +29,15 @@
13 29 shouldUseLaunchSchemeArgsEnv = "YES">
14 30 <Testables>
15 31 </Testables>
  32 + <MacroExpansion>
  33 + <BuildableReference
  34 + BuildableIdentifier = "primary"
  35 + BlueprintIdentifier = "97139A2C1CACEB6600B3E1CB"
  36 + BuildableName = "PikiDeepLinkTester.app"
  37 + BlueprintName = "PikiDeepLinkTester"
  38 + ReferencedContainer = "container:PikiDeepLinkTester.xcodeproj">
  39 + </BuildableReference>
  40 + </MacroExpansion>
16 41 <AdditionalOptions>
17 42 </AdditionalOptions>
18 43 </TestAction>
... ... @@ -26,6 +51,16 @@
26 51 debugDocumentVersioning = "YES"
27 52 debugServiceExtension = "internal"
28 53 allowLocationSimulation = "YES">
  54 + <BuildableProductRunnable
  55 + runnableDebuggingMode = "0">
  56 + <BuildableReference
  57 + BuildableIdentifier = "primary"
  58 + BlueprintIdentifier = "97139A2C1CACEB6600B3E1CB"
  59 + BuildableName = "PikiDeepLinkTester.app"
  60 + BlueprintName = "PikiDeepLinkTester"
  61 + ReferencedContainer = "container:PikiDeepLinkTester.xcodeproj">
  62 + </BuildableReference>
  63 + </BuildableProductRunnable>
29 64 <AdditionalOptions>
30 65 </AdditionalOptions>
31 66 </LaunchAction>
... ... @@ -35,6 +70,16 @@
35 70 savedToolIdentifier = ""
36 71 useCustomWorkingDirectory = "NO"
37 72 debugDocumentVersioning = "YES">
  73 + <BuildableProductRunnable
  74 + runnableDebuggingMode = "0">
  75 + <BuildableReference
  76 + BuildableIdentifier = "primary"
  77 + BlueprintIdentifier = "97139A2C1CACEB6600B3E1CB"
  78 + BuildableName = "PikiDeepLinkTester.app"
  79 + BlueprintName = "PikiDeepLinkTester"
  80 + ReferencedContainer = "container:PikiDeepLinkTester.xcodeproj">
  81 + </BuildableReference>
  82 + </BuildableProductRunnable>
38 83 </ProfileAction>
39 84 <AnalyzeAction
40 85 buildConfiguration = "Debug">
PikiDeepLinkTester/Base.lproj/Main.storyboard View file @ 6faf530
1 1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2   -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6211" systemVersion="14A298i" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
  2 +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
3 3 <dependencies>
4   - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6204"/>
  4 + <deployment identifier="iOS"/>
  5 + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
5 6 </dependencies>
6 7 <scenes>
7 8 <!--View Controller-->
8 9 <scene sceneID="tne-QT-ifu">
9 10 <objects>
10   - <viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="" sceneMemberID="viewController">
  11 + <viewController id="BYZ-38-t0r" customClass="ViewController" sceneMemberID="viewController">
11 12 <layoutGuides>
12 13 <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
13 14 <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
14 15  
15 16  
... ... @@ -15,8 +16,121 @@
15 16 <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
16 17 <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
17 18 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
  19 + <subviews>
  20 + <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="pXy-E5-sbK">
  21 + <rect key="frame" x="0.0" y="120" width="600" height="480"/>
  22 + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
  23 + <prototypes>
  24 + <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="cell" textLabel="jb3-d9-54h" detailTextLabel="4gM-gq-bI5" style="IBUITableViewCellStyleSubtitle" id="8MZ-Bu-SLk">
  25 + <rect key="frame" x="0.0" y="28" width="600" height="44"/>
  26 + <autoresizingMask key="autoresizingMask"/>
  27 + <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="8MZ-Bu-SLk" id="263-JE-Mx4">
  28 + <rect key="frame" x="0.0" y="0.0" width="600" height="43.5"/>
  29 + <autoresizingMask key="autoresizingMask"/>
  30 + <subviews>
  31 + <label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="jb3-d9-54h">
  32 + <rect key="frame" x="15" y="6" width="31.5" height="19.5"/>
  33 + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
  34 + <fontDescription key="fontDescription" type="system" pointSize="16"/>
  35 + <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
  36 + <nil key="highlightedColor"/>
  37 + </label>
  38 + <label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Detail" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="4gM-gq-bI5">
  39 + <rect key="frame" x="15" y="25.5" width="30.5" height="13.5"/>
  40 + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
  41 + <fontDescription key="fontDescription" type="system" pointSize="11"/>
  42 + <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
  43 + <nil key="highlightedColor"/>
  44 + </label>
  45 + </subviews>
  46 + </tableViewCellContentView>
  47 + </tableViewCell>
  48 + </prototypes>
  49 + <connections>
  50 + <outlet property="dataSource" destination="BYZ-38-t0r" id="rzQ-tL-Kzf"/>
  51 + <outlet property="delegate" destination="BYZ-38-t0r" id="H1P-Hx-YH4"/>
  52 + </connections>
  53 + </tableView>
  54 + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ContentsID" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yQH-Hc-ku1">
  55 + <rect key="frame" x="10" y="30" width="86" height="30"/>
  56 + <fontDescription key="fontDescription" type="system" pointSize="17"/>
  57 + <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
  58 + <nil key="highlightedColor"/>
  59 + </label>
  60 + <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="숫자만" textAlignment="natural" clearsOnBeginEditing="YES" minimumFontSize="17" clearButtonMode="always" translatesAutoresizingMaskIntoConstraints="NO" id="52H-Zx-Fu6">
  61 + <rect key="frame" x="106" y="30" width="80" height="30"/>
  62 + <constraints>
  63 + <constraint firstAttribute="width" constant="80" id="RYq-5V-5nd"/>
  64 + <constraint firstAttribute="height" constant="30" id="W4J-Wp-bLA"/>
  65 + </constraints>
  66 + <fontDescription key="fontDescription" type="system" pointSize="14"/>
  67 + <textInputTraits key="textInputTraits" keyboardType="numberPad" returnKeyType="done" enablesReturnKeyAutomatically="YES"/>
  68 + <connections>
  69 + <outlet property="delegate" destination="BYZ-38-t0r" id="vzD-AM-P7w"/>
  70 + </connections>
  71 + </textField>
  72 + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="whc-zZ-dgU">
  73 + <rect key="frame" x="196" y="30" width="35" height="30"/>
  74 + <state key="normal" title="Input"/>
  75 + <connections>
  76 + <action selector="clickInputContentsID:" destination="BYZ-38-t0r" eventType="touchUpInside" id="usy-sT-FQt"/>
  77 + </connections>
  78 + </button>
  79 + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="CardID" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XFH-ij-wq9">
  80 + <rect key="frame" x="10" y="65" width="86" height="30"/>
  81 + <fontDescription key="fontDescription" type="system" pointSize="17"/>
  82 + <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
  83 + <nil key="highlightedColor"/>
  84 + </label>
  85 + <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="숫자만" textAlignment="natural" clearsOnBeginEditing="YES" minimumFontSize="17" clearButtonMode="always" translatesAutoresizingMaskIntoConstraints="NO" id="xTr-7b-0xo">
  86 + <rect key="frame" x="106" y="65" width="80" height="30"/>
  87 + <constraints>
  88 + <constraint firstAttribute="height" constant="30" id="CBE-Bn-Kvm"/>
  89 + <constraint firstAttribute="width" constant="80" id="P0y-Fs-uLM"/>
  90 + </constraints>
  91 + <fontDescription key="fontDescription" type="system" pointSize="14"/>
  92 + <textInputTraits key="textInputTraits" keyboardType="numberPad" returnKeyType="done" enablesReturnKeyAutomatically="YES"/>
  93 + <connections>
  94 + <outlet property="delegate" destination="BYZ-38-t0r" id="156-DZ-hxg"/>
  95 + </connections>
  96 + </textField>
  97 + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="wwB-M0-YKM">
  98 + <rect key="frame" x="196" y="65" width="35" height="30"/>
  99 + <state key="normal" title="Input"/>
  100 + <connections>
  101 + <action selector="clickInputCardID:" destination="BYZ-38-t0r" eventType="touchUpInside" id="M3n-WH-uMP"/>
  102 + </connections>
  103 + </button>
  104 + </subviews>
18 105 <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
  106 + <constraints>
  107 + <constraint firstItem="pXy-E5-sbK" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" id="539-c8-Yt7"/>
  108 + <constraint firstItem="xTr-7b-0xo" firstAttribute="leading" secondItem="XFH-ij-wq9" secondAttribute="trailing" constant="10" id="F89-Dn-onC"/>
  109 + <constraint firstItem="52H-Zx-Fu6" firstAttribute="top" secondItem="yQH-Hc-ku1" secondAttribute="top" id="Grq-bR-f4b"/>
  110 + <constraint firstItem="whc-zZ-dgU" firstAttribute="leading" secondItem="52H-Zx-Fu6" secondAttribute="trailing" constant="10" id="IP9-Ha-g4V"/>
  111 + <constraint firstItem="yQH-Hc-ku1" firstAttribute="top" secondItem="y3c-jy-aDJ" secondAttribute="bottom" constant="10" id="Kor-me-2K2"/>
  112 + <constraint firstItem="whc-zZ-dgU" firstAttribute="top" secondItem="yQH-Hc-ku1" secondAttribute="top" id="PTk-4K-BT3"/>
  113 + <constraint firstItem="XFH-ij-wq9" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" constant="10" id="R2R-Ao-S56"/>
  114 + <constraint firstItem="wfy-db-euE" firstAttribute="top" secondItem="pXy-E5-sbK" secondAttribute="bottom" id="YKK-Na-qDr"/>
  115 + <constraint firstItem="XFH-ij-wq9" firstAttribute="top" secondItem="yQH-Hc-ku1" secondAttribute="bottom" constant="5" id="YbR-Mq-B9g"/>
  116 + <constraint firstItem="wwB-M0-YKM" firstAttribute="leading" secondItem="xTr-7b-0xo" secondAttribute="trailing" constant="10" id="Ygn-El-yNX"/>
  117 + <constraint firstItem="wwB-M0-YKM" firstAttribute="top" secondItem="XFH-ij-wq9" secondAttribute="top" id="ZG6-Zn-YHg"/>
  118 + <constraint firstAttribute="trailing" secondItem="pXy-E5-sbK" secondAttribute="trailing" id="axG-C0-hEs"/>
  119 + <constraint firstItem="xTr-7b-0xo" firstAttribute="height" secondItem="XFH-ij-wq9" secondAttribute="height" id="bWQ-fs-c2z"/>
  120 + <constraint firstItem="52H-Zx-Fu6" firstAttribute="leading" secondItem="yQH-Hc-ku1" secondAttribute="trailing" constant="10" id="fI9-Vg-t1U"/>
  121 + <constraint firstItem="yQH-Hc-ku1" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" constant="10" id="gfh-Bl-deq"/>
  122 + <constraint firstItem="xTr-7b-0xo" firstAttribute="top" secondItem="XFH-ij-wq9" secondAttribute="top" id="gtY-Nf-Dsu"/>
  123 + <constraint firstItem="52H-Zx-Fu6" firstAttribute="leading" secondItem="xTr-7b-0xo" secondAttribute="leading" id="h0t-kn-iOn"/>
  124 + <constraint firstItem="52H-Zx-Fu6" firstAttribute="height" secondItem="yQH-Hc-ku1" secondAttribute="height" id="lt5-yW-k09"/>
  125 + <constraint firstItem="pXy-E5-sbK" firstAttribute="top" secondItem="y3c-jy-aDJ" secondAttribute="bottom" constant="100" id="m2Y-Kl-VlG"/>
  126 + </constraints>
19 127 </view>
  128 + <connections>
  129 + <outlet property="tableView" destination="pXy-E5-sbK" id="TSL-cm-hmA"/>
  130 + <outlet property="tfCardID" destination="xTr-7b-0xo" id="zws-yd-uCv"/>
  131 + <outlet property="tfContentsID" destination="52H-Zx-Fu6" id="HXb-rd-dkC"/>
  132 + <outlet property="view" destination="8bC-Xf-vdC" id="VW6-7Y-Mhw"/>
  133 + </connections>
20 134 </viewController>
21 135 <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
22 136 </objects>
PikiDeepLinkTester/ViewController.h View file @ 6faf530
... ... @@ -8,7 +8,7 @@
8 8  
9 9 #import <UIKit/UIKit.h>
10 10  
11   -@interface ViewController : UIViewController
  11 +@interface ViewController : UIViewController<UITableViewDelegate, UITableViewDataSource, UITextFieldDelegate>
12 12  
13 13  
14 14 @end
PikiDeepLinkTester/ViewController.m View file @ 6faf530
... ... @@ -10,6 +10,12 @@
10 10  
11 11 @interface ViewController ()
12 12  
  13 +@property (strong, nonatomic) NSArray *deepLinks;
  14 +
  15 +@property (strong, nonatomic) IBOutlet UITextField *tfContentsID;
  16 +@property (strong, nonatomic) IBOutlet UITextField *tfCardID;
  17 +@property (strong, nonatomic) IBOutlet UITableView *tableView;
  18 +
13 19 @end
14 20  
15 21 @implementation ViewController
16 22  
... ... @@ -17,11 +23,141 @@
17 23 - (void)viewDidLoad {
18 24 [super viewDidLoad];
19 25 // Do any additional setup after loading the view, typically from a nib.
  26 + [self initView];
  27 +
  28 + [self.tableView reloadData];
20 29 }
21 30  
22 31 - (void)didReceiveMemoryWarning {
23 32 [super didReceiveMemoryWarning];
24 33 // Dispose of any resources that can be recreated.
  34 +}
  35 +
  36 +- (void) initView {
  37 + NSString *searchKeyword = @"단짠";
  38 +
  39 + self.deepLinks = @[@{@"title":@"Main feed", @"url":@"piki://contents"}
  40 + , @{@"title":@"Specific Content", @"url":@"piki://contents/162509"}
  41 + , @{@"title":@"Specific Content's Card", @"url":@"piki://contents/162509/cards/22634339"}
  42 + , @{@"title":@"Specific Content's Comments", @"url":@"piki://contents/162509/comments"}
  43 + , @{@"title":@"Specific Content's Card's Comments", @"url":@"piki://contents/162509/cards/22634339/comments"}
  44 + , @{@"title":@"Specific Content's Comments's Recomments", @"url":@"piki://contents/162509/comments/179284875/recomments"}
  45 + , @{@"title":@"Specific Content's Card's Comments's Recomments", @"url":@"piki://contents/162509/cards/22637204/comments/179319834/recomments"}
  46 + , @{@"title":@"Best", @"url":@"piki://bests"}
  47 + , @{@"title":@"Pikitoons", @"url":@"piki://toons"}
  48 + , @{@"title":@"Pikitoons ThursDay", @"url":@"piki://toons/thu"}
  49 + , @{@"title":@"Pikitoons Completed", @"url":@"piki://toons/all/completed"}
  50 + , @{@"title":@"Pikitoons Continued", @"url":@"piki://toons/all/continued"}
  51 + , @{@"title":@"Categories", @"url":@"piki://categories/74"}
  52 + , @{@"title":@"Series", @"url":@"piki://series/161737"}
  53 + , @{@"title":@"Users", @"url":@"piki://users/3067293"}
  54 + , @{@"title":@"User's Content", @"url":@"piki://users/3067293/content"}
  55 + , @{@"title":@"User's following", @"url":@"piki://users/3067293/following"}
  56 + , @{@"title":@"User's follower", @"url":@"piki://users/3067293/follower"}
  57 + , @{@"title":@"Accounts", @"url":@"piki://me"}
  58 + , @{@"title":@"Account's content", @"url":@"piki://me/content"}
  59 + , @{@"title":@"Account's following", @"url":@"piki://me/following"}
  60 + , @{@"title":@"Account's follower", @"url":@"piki://me/follower"}
  61 + , @{@"title":@"Accounts Edit", @"url":@"piki://me/edit"}
  62 + , @{@"title":@"Accounts SingIn", @"url":@"piki://me/login"}
  63 + , @{@"title":@"Accounts SignUp", @"url":@"piki://me/signup"}
  64 + , @{@"title":@"Bookmarks (id:alanlee@pikicast)", @"url":@"piki://me/albums"}
  65 + , @{@"title":@"Bookmarks Specific Album (id:alanlee@pikicast)", @"url":@"piki://me/albums/6141597"}
  66 + , @{@"title":@"Bookmarks Album Edit (id:alanlee@pikicast)", @"url":@"piki://me/albums/6141597/edit"}
  67 + , @{@"title":@"Search", @"url":@"piki://search"}
  68 + , @{@"title":@"Search content", @"url":@"piki://search/content"}
  69 + , @{@"title":@"Search editor", @"url":@"piki://search/editor"}
  70 + , @{@"title":@"Search content with keyword"
  71 + , @"url":[NSString stringWithFormat:@"piki://search/content?keyword=%@", [searchKeyword stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]}
  72 + , @{@"title":@"Search editor with keyword"
  73 + , @"url":[NSString stringWithFormat:@"piki://search/editor?keyword=%@", [searchKeyword stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]}
  74 + , @{@"title":@"Notices", @"url":@"piki://notices"}
  75 + , @{@"title":@"Notifications", @"url":@"piki://notifications"}
  76 + , @{@"title":@"History List", @"url":@"piki://history"}
  77 + , @{@"title":@"Outbound open internal", @"url":@"piki://outbounds/internal?url=http://www.apple.com/kr/"}
  78 + , @{@"title":@"Outbound open external", @"url":@"piki://outbounds/external?url=http://www.apple.com/kr/"}
  79 + ];
  80 +}
  81 +
  82 +- (void) openDeepLink:(id) sender {
  83 + UIButton *btn = (UIButton *)sender;
  84 + [[UIApplication sharedApplication] openURL:[NSURL URLWithString:btn.currentTitle]];
  85 +}
  86 +
  87 +- (BOOL) openDeepLinkWithString:(NSString *) strDeepLink {
  88 + return [[UIApplication sharedApplication] openURL:[NSURL URLWithString:strDeepLink]];
  89 +}
  90 +
  91 +- (IBAction)clickInputContentsID:(id)sender {
  92 + [self.tfContentsID resignFirstResponder];
  93 +}
  94 +
  95 +- (IBAction)clickInputCardID:(id)sender {
  96 + [self.tfCardID resignFirstResponder];
  97 +}
  98 +
  99 +- (void)changeContentsID:(NSString *)contentsID {
  100 +}
  101 +
  102 +- (void)changeCardID:(NSString *)cardID {
  103 +}
  104 +
  105 +#pragma mark - UITableViewDelegate & UITableViewDataSource
  106 +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  107 + NSDictionary *dic = self.deepLinks[indexPath.row];
  108 +
  109 + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell"];
  110 + if (cell) {
  111 + [cell.textLabel setText:dic[@"title"]];
  112 + [cell.detailTextLabel setText:dic[@"url"]];
  113 + } else {
  114 + [cell.textLabel setText:dic[@"title"]];
  115 + [cell.detailTextLabel setText:dic[@"url"]];
  116 + }
  117 +
  118 + return cell;
  119 +}
  120 +
  121 +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
  122 + return self.deepLinks.count;
  123 +}
  124 +
  125 +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
  126 + UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
  127 + if (cell) {
  128 + [self openDeepLinkWithString:cell.detailTextLabel.text];
  129 + }
  130 +}
  131 +
  132 +- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
  133 + UITouch *touch = [[event allTouches] anyObject];
  134 +
  135 + if (touch.view != self.tfCardID) {
  136 + if ([self.tfCardID isFirstResponder]) {
  137 + [self.tfCardID resignFirstResponder];
  138 + }
  139 + }
  140 +
  141 + if (touch.view != self.tfContentsID) {
  142 + if ([self.tfContentsID isFirstResponder]) {
  143 + [self.tfContentsID resignFirstResponder];
  144 + }
  145 + }
  146 +}
  147 +
  148 +#pragma mark - UITextFieldDelegate
  149 +- (BOOL)textFieldShouldReturn:(UITextField *)textField {
  150 + if (textField == self.tfContentsID) {
  151 + [self clickInputContentsID:nil];
  152 + return YES;
  153 + }
  154 +
  155 + if (textField == self.tfCardID) {
  156 + [self clickInputCardID:nil];
  157 + return YES;
  158 + }
  159 +
  160 + return NO;
25 161 }
26 162  
27 163 @end