Skip to content

Commit 32e51d4

Browse files
committed
Set up a local development pod
1 parent bc1289f commit 32e51d4

10 files changed

Lines changed: 204 additions & 6 deletions

File tree

Example/Example.xcodeproj/project.pbxproj

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
154CE52873EEBDF8EF05A61F /* Pods_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0DB1D3E89AB75183DB104E0 /* Pods_Example.framework */; };
1011
B548C5A71C8D55A8009D5AEE /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = B548C5A51C8D55A8009D5AEE /* InfoPlist.strings */; };
1112
B5E9F8FF1C8D3B6E00443DC7 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5E9F8FE1C8D3B6E00443DC7 /* AppDelegate.swift */; };
1213
B5E9F9011C8D3B6E00443DC7 /* ExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5E9F9001C8D3B6E00443DC7 /* ExampleViewController.swift */; };
@@ -22,23 +23,46 @@
2223
B5E9F9051C8D3B6E00443DC7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
2324
B5E9F9081C8D3B6E00443DC7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
2425
B5E9F90A1C8D3B6E00443DC7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
26+
CA708B7D49E7D80A75ED81E3 /* Pods-Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-Example/Pods-Example.debug.xcconfig"; sourceTree = "<group>"; };
27+
D0DB1D3E89AB75183DB104E0 /* Pods_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
28+
FE1A89C8A77ED0438A206A24 /* Pods-Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.release.xcconfig"; path = "../Pods/Target Support Files/Pods-Example/Pods-Example.release.xcconfig"; sourceTree = "<group>"; };
2529
/* End PBXFileReference section */
2630

2731
/* Begin PBXFrameworksBuildPhase section */
2832
B5E9F8F81C8D3B6E00443DC7 /* Frameworks */ = {
2933
isa = PBXFrameworksBuildPhase;
3034
buildActionMask = 2147483647;
3135
files = (
36+
154CE52873EEBDF8EF05A61F /* Pods_Example.framework in Frameworks */,
3237
);
3338
runOnlyForDeploymentPostprocessing = 0;
3439
};
3540
/* End PBXFrameworksBuildPhase section */
3641

3742
/* Begin PBXGroup section */
43+
2360BA848BFD7B4A1C83DD92 /* Pods */ = {
44+
isa = PBXGroup;
45+
children = (
46+
CA708B7D49E7D80A75ED81E3 /* Pods-Example.debug.xcconfig */,
47+
FE1A89C8A77ED0438A206A24 /* Pods-Example.release.xcconfig */,
48+
);
49+
name = Pods;
50+
sourceTree = "<group>";
51+
};
52+
5EEA7B5ACE2834D63EB8CB50 /* Frameworks */ = {
53+
isa = PBXGroup;
54+
children = (
55+
D0DB1D3E89AB75183DB104E0 /* Pods_Example.framework */,
56+
);
57+
name = Frameworks;
58+
sourceTree = "<group>";
59+
};
3860
B5E9F8F21C8D3B6E00443DC7 = {
3961
isa = PBXGroup;
4062
children = (
4163
B5E9F8FD1C8D3B6E00443DC7 /* Example */,
64+
5EEA7B5ACE2834D63EB8CB50 /* Frameworks */,
65+
2360BA848BFD7B4A1C83DD92 /* Pods */,
4266
B5E9F8FC1C8D3B6E00443DC7 /* Products */,
4367
);
4468
sourceTree = "<group>";
@@ -71,9 +95,12 @@
7195
isa = PBXNativeTarget;
7296
buildConfigurationList = B5E9F90D1C8D3B6E00443DC7 /* Build configuration list for PBXNativeTarget "Example" */;
7397
buildPhases = (
98+
96705876C946719953BCD0C6 /* Check Pods Manifest.lock */,
7499
B5E9F8F71C8D3B6E00443DC7 /* Sources */,
75100
B5E9F8F81C8D3B6E00443DC7 /* Frameworks */,
76101
B5E9F8F91C8D3B6E00443DC7 /* Resources */,
102+
CAB3B20531AAE2438C48D751 /* Embed Pods Frameworks */,
103+
7B2FB96C7361D5883F3ADD14 /* Copy Pods Resources */,
77104
);
78105
buildRules = (
79106
);
@@ -130,6 +157,54 @@
130157
};
131158
/* End PBXResourcesBuildPhase section */
132159

160+
/* Begin PBXShellScriptBuildPhase section */
161+
7B2FB96C7361D5883F3ADD14 /* Copy Pods Resources */ = {
162+
isa = PBXShellScriptBuildPhase;
163+
buildActionMask = 2147483647;
164+
files = (
165+
);
166+
inputPaths = (
167+
);
168+
name = "Copy Pods Resources";
169+
outputPaths = (
170+
);
171+
runOnlyForDeploymentPostprocessing = 0;
172+
shellPath = /bin/sh;
173+
shellScript = "\"${SRCROOT}/../Pods/Target Support Files/Pods-Example/Pods-Example-resources.sh\"\n";
174+
showEnvVarsInLog = 0;
175+
};
176+
96705876C946719953BCD0C6 /* Check Pods Manifest.lock */ = {
177+
isa = PBXShellScriptBuildPhase;
178+
buildActionMask = 2147483647;
179+
files = (
180+
);
181+
inputPaths = (
182+
);
183+
name = "Check Pods Manifest.lock";
184+
outputPaths = (
185+
);
186+
runOnlyForDeploymentPostprocessing = 0;
187+
shellPath = /bin/sh;
188+
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
189+
showEnvVarsInLog = 0;
190+
};
191+
CAB3B20531AAE2438C48D751 /* Embed Pods Frameworks */ = {
192+
isa = PBXShellScriptBuildPhase;
193+
buildActionMask = 2147483647;
194+
files = (
195+
);
196+
inputPaths = (
197+
);
198+
name = "Embed Pods Frameworks";
199+
outputPaths = (
200+
);
201+
runOnlyForDeploymentPostprocessing = 0;
202+
shellPath = /bin/sh;
203+
shellScript = "\"${SRCROOT}/../Pods/Target Support Files/Pods-Example/Pods-Example-frameworks.sh\"\n";
204+
showEnvVarsInLog = 0;
205+
};
206+
/* End PBXShellScriptBuildPhase section */
207+
133208
/* Begin PBXSourcesBuildPhase section */
134209
B5E9F8F71C8D3B6E00443DC7 /* Sources */ = {
135210
isa = PBXSourcesBuildPhase;
@@ -245,6 +320,7 @@
245320
};
246321
B5E9F90E1C8D3B6E00443DC7 /* Debug */ = {
247322
isa = XCBuildConfiguration;
323+
baseConfigurationReference = CA708B7D49E7D80A75ED81E3 /* Pods-Example.debug.xcconfig */;
248324
buildSettings = {
249325
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
250326
INFOPLIST_FILE = Example/Info.plist;
@@ -256,6 +332,7 @@
256332
};
257333
B5E9F90F1C8D3B6E00443DC7 /* Release */ = {
258334
isa = XCBuildConfiguration;
335+
baseConfigurationReference = FE1A89C8A77ED0438A206A24 /* Pods-Example.release.xcconfig */;
259336
buildSettings = {
260337
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
261338
INFOPLIST_FILE = Example/Info.plist;

Example/Example/ExampleViewController.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
//
2626

2727
import UIKit
28+
import ICInputAccessory
2829

2930
class ExampleViewController: UIViewController, UITableViewDataSource {
3031

@@ -36,7 +37,7 @@ class ExampleViewController: UIViewController, UITableViewDataSource {
3637
return _tableView
3738
}()
3839

39-
private let types = ["ICKeyboardDismissAccessoryView"]
40+
private let types: [UIView.Type] = [ICKeyboardDismissAccessoryView.self]
4041

4142
// MARK: - Initialization
4243

@@ -65,7 +66,7 @@ class ExampleViewController: UIViewController, UITableViewDataSource {
6566
}
6667

6768
func tableView(tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
68-
return types[section]
69+
return String(types[section])
6970
}
7071

7172
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {

Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
source "http://rubygems.org"
2+
3+
gem "cocoapods", "~> 0.39.0"

Gemfile.lock

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
GEM
2+
remote: http://rubygems.org/
3+
specs:
4+
activesupport (4.2.5.2)
5+
i18n (~> 0.7)
6+
json (~> 1.7, >= 1.7.7)
7+
minitest (~> 5.1)
8+
thread_safe (~> 0.3, >= 0.3.4)
9+
tzinfo (~> 1.1)
10+
claide (0.9.1)
11+
cocoapods (0.39.0)
12+
activesupport (>= 4.0.2)
13+
claide (~> 0.9.1)
14+
cocoapods-core (= 0.39.0)
15+
cocoapods-downloader (~> 0.9.3)
16+
cocoapods-plugins (~> 0.4.2)
17+
cocoapods-search (~> 0.1.0)
18+
cocoapods-stats (~> 0.6.2)
19+
cocoapods-trunk (~> 0.6.4)
20+
cocoapods-try (~> 0.5.1)
21+
colored (~> 1.2)
22+
escape (~> 0.0.4)
23+
molinillo (~> 0.4.0)
24+
nap (~> 1.0)
25+
xcodeproj (~> 0.28.2)
26+
cocoapods-core (0.39.0)
27+
activesupport (>= 4.0.2)
28+
fuzzy_match (~> 2.0.4)
29+
nap (~> 1.0)
30+
cocoapods-downloader (0.9.3)
31+
cocoapods-plugins (0.4.2)
32+
nap
33+
cocoapods-search (0.1.0)
34+
cocoapods-stats (0.6.2)
35+
cocoapods-trunk (0.6.4)
36+
nap (>= 0.8, < 2.0)
37+
netrc (= 0.7.8)
38+
cocoapods-try (0.5.1)
39+
colored (1.2)
40+
escape (0.0.4)
41+
fuzzy_match (2.0.4)
42+
i18n (0.7.0)
43+
json (1.8.3)
44+
minitest (5.8.4)
45+
molinillo (0.4.4)
46+
nap (1.1.0)
47+
netrc (0.7.8)
48+
thread_safe (0.3.5)
49+
tzinfo (1.2.2)
50+
thread_safe (~> 0.1)
51+
xcodeproj (0.28.2)
52+
activesupport (>= 3)
53+
claide (~> 0.9.1)
54+
colored (~> 1.2)
55+
56+
PLATFORMS
57+
ruby
58+
59+
DEPENDENCIES
60+
cocoapods (~> 0.39.0)
61+
62+
BUNDLED WITH
63+
1.11.2

ICInputAccessory.podspec

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Pod::Spec.new do |s|
2+
s.name = "ICInputAccessory"
3+
s.version = "0.1.0"
4+
s.summary = "A customized input accessory UI to dismiss keyboard."
5+
6+
s.homepage = "https://github.com/polydice/ICInputAccessory"
7+
s.license = { type: "MIT", file: "LICENSE" }
8+
s.authors = "bcylin", "trisix"
9+
10+
s.platform = :ios, "8.0"
11+
s.source = { git: "https://github.com/polydice/ICInputAccessory.git", tag: "v#{s.version}" }
12+
s.source_files = "Source/*.swift"
13+
s.resources = "Source/*.xcassets"
14+
s.requires_arc = true
15+
end

ICInputAccessory.xcworkspace/contents.xcworkspacedata

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
pod-install:
2+
bundle exec pod install --no-repo-update

Podfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
platform :ios, "8.0"
2+
use_frameworks!
3+
4+
workspace "ICInputAccessory"
5+
xcodeproj "ICInputAccessory"
6+
xcodeproj "Example/Example"
7+
8+
target :Example do
9+
pod "ICInputAccessory", path: "./"
10+
end

Podfile.lock

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
PODS:
2+
- ICInputAccessory (0.1.0)
3+
4+
DEPENDENCIES:
5+
- ICInputAccessory (from `./`)
6+
7+
EXTERNAL SOURCES:
8+
ICInputAccessory:
9+
:path: "./"
10+
11+
SPEC CHECKSUMS:
12+
ICInputAccessory: 99d2957193e587e3d82c4b3a045c58c3b02c120c
13+
14+
COCOAPODS: 0.39.0

Source/ICKeyboardDismissAccessoryView.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
import UIKit
2828

29-
class ICKeyboardDismissAccessoryView: UIView {
29+
public class ICKeyboardDismissAccessoryView: UIView {
3030

3131
private(set) lazy var dismissButton: UIButton = {
3232
let _button = UIButton()
@@ -43,19 +43,19 @@ class ICKeyboardDismissAccessoryView: UIView {
4343

4444
// MARK: - Initialization
4545

46-
override init(frame: CGRect) {
46+
override public init(frame: CGRect) {
4747
super.init(frame: frame)
4848
setUpSubviews()
4949
}
5050

51-
required init?(coder aDecoder: NSCoder) {
51+
required public init?(coder aDecoder: NSCoder) {
5252
super.init(coder: aDecoder)
5353
setUpSubviews()
5454
}
5555

5656
// MARK: - UIView
5757

58-
override func pointInside(point: CGPoint, withEvent event: UIEvent?) -> Bool {
58+
override public func pointInside(point: CGPoint, withEvent event: UIEvent?) -> Bool {
5959
for subview in subviews {
6060
if !subview.hidden && subview.alpha > 0 &&
6161
subview.userInteractionEnabled &&

0 commit comments

Comments
 (0)