Skip to content

Commit e9d37e9

Browse files
committed
Merge branch 'release/1.1.0'
2 parents a69f2d7 + 613aa74 commit e9d37e9

30 files changed

+608
-147
lines changed

.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.3.1

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
language: objective-c
2-
osx_image: xcode7.2
2+
osx_image: xcode7.3
33
env:
44
matrix:
55
- VERSION=8.4
@@ -16,7 +16,7 @@ install:
1616
before_script:
1717
- xcodebuild -workspace ICInputAccessory.xcworkspace -list
1818
script:
19-
- bundle exec rake ci:test[$VERSION]
19+
- bundle exec rake ci:build[$VERSION]
2020
notifications:
2121
email: false
2222
slack:

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
1+
## v1.1.0
2+
3+
#### Changes
4+
5+
* Support storyboard
6+
* Support subspecs
7+
* Upgrade to Swift 2.2
8+
* Use CocoaPods (1.0.1)
9+
110
## v1.0.0
211

312
Initial release written in Swift 2.1.
413

5-
#### Added
14+
#### Changes
615

716
* `ICKeyboardDismissTextField` with an accessory view to dismiss keyboard.
817
* `ICTokenField`, a text field that groups input texts as tokens.

Example/Example.xcodeproj/project.pbxproj

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,15 @@
1111
B52819581C90215C007D01D5 /* CustomizedTokenField.swift in Sources */ = {isa = PBXBuildFile; fileRef = B52819571C90215C007D01D5 /* CustomizedTokenField.swift */; };
1212
B548C5A71C8D55A8009D5AEE /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = B548C5A51C8D55A8009D5AEE /* InfoPlist.strings */; };
1313
B548C5A91C8D6150009D5AEE /* ExampleCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B548C5A81C8D6150009D5AEE /* ExampleCell.swift */; };
14-
B548C5C51C8E91B0009D5AEE /* ICInputAccessoryUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B548C5C41C8E91B0009D5AEE /* ICInputAccessoryUITests.swift */; };
14+
B548C5C51C8E91B0009D5AEE /* ICTokenFieldUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B548C5C41C8E91B0009D5AEE /* ICTokenFieldUITests.swift */; };
1515
B5C53E191C92851400AF3489 /* CustomizedTokenViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5C53E181C92851400AF3489 /* CustomizedTokenViewController.swift */; };
16+
B5D04CFE1C99A7C900174823 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B5D04CFD1C99A7C900174823 /* Main.storyboard */; };
17+
B5D04D001C99AF0700174823 /* StoryboardViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5D04CFF1C99AF0700174823 /* StoryboardViewController.swift */; };
1618
B5E9F8FF1C8D3B6E00443DC7 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5E9F8FE1C8D3B6E00443DC7 /* AppDelegate.swift */; };
1719
B5E9F9011C8D3B6E00443DC7 /* ExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5E9F9001C8D3B6E00443DC7 /* ExampleViewController.swift */; };
1820
B5E9F9061C8D3B6E00443DC7 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B5E9F9051C8D3B6E00443DC7 /* Assets.xcassets */; };
1921
B5E9F9091C8D3B6E00443DC7 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B5E9F9071C8D3B6E00443DC7 /* LaunchScreen.storyboard */; };
22+
B5F62A5D1C9ECBCB003A1231 /* ICKeyboardDismissTextFieldUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5F62A5C1C9ECBCB003A1231 /* ICKeyboardDismissTextFieldUITests.swift */; };
2023
/* End PBXBuildFile section */
2124

2225
/* Begin PBXContainerItemProxy section */
@@ -34,15 +37,18 @@
3437
B548C5A61C8D55A8009D5AEE /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/InfoPlist.strings; sourceTree = "<group>"; };
3538
B548C5A81C8D6150009D5AEE /* ExampleCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExampleCell.swift; sourceTree = "<group>"; };
3639
B548C5C21C8E91B0009D5AEE /* ICInputAccessoryUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ICInputAccessoryUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
37-
B548C5C41C8E91B0009D5AEE /* ICInputAccessoryUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ICInputAccessoryUITests.swift; sourceTree = "<group>"; };
40+
B548C5C41C8E91B0009D5AEE /* ICTokenFieldUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ICTokenFieldUITests.swift; sourceTree = "<group>"; };
3841
B548C5C61C8E91B0009D5AEE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
3942
B5C53E181C92851400AF3489 /* CustomizedTokenViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomizedTokenViewController.swift; sourceTree = "<group>"; };
43+
B5D04CFD1C99A7C900174823 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = "<group>"; };
44+
B5D04CFF1C99AF0700174823 /* StoryboardViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StoryboardViewController.swift; sourceTree = "<group>"; };
4045
B5E9F8FB1C8D3B6E00443DC7 /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
4146
B5E9F8FE1C8D3B6E00443DC7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
4247
B5E9F9001C8D3B6E00443DC7 /* ExampleViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleViewController.swift; sourceTree = "<group>"; };
4348
B5E9F9051C8D3B6E00443DC7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
4449
B5E9F9081C8D3B6E00443DC7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
4550
B5E9F90A1C8D3B6E00443DC7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
51+
B5F62A5C1C9ECBCB003A1231 /* ICKeyboardDismissTextFieldUITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ICKeyboardDismissTextFieldUITests.swift; sourceTree = "<group>"; };
4652
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>"; };
4753
D0DB1D3E89AB75183DB104E0 /* Pods_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
4854
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>"; };
@@ -87,7 +93,8 @@
8793
B548C5C31C8E91B0009D5AEE /* ICInputAccessoryUITests */ = {
8894
isa = PBXGroup;
8995
children = (
90-
B548C5C41C8E91B0009D5AEE /* ICInputAccessoryUITests.swift */,
96+
B5F62A5C1C9ECBCB003A1231 /* ICKeyboardDismissTextFieldUITests.swift */,
97+
B548C5C41C8E91B0009D5AEE /* ICTokenFieldUITests.swift */,
9198
B548C5C61C8E91B0009D5AEE /* Info.plist */,
9299
);
93100
path = ICInputAccessoryUITests;
@@ -125,6 +132,8 @@
125132
B5E9F90A1C8D3B6E00443DC7 /* Info.plist */,
126133
B548C5A51C8D55A8009D5AEE /* InfoPlist.strings */,
127134
B5E9F9071C8D3B6E00443DC7 /* LaunchScreen.storyboard */,
135+
B5D04CFD1C99A7C900174823 /* Main.storyboard */,
136+
B5D04CFF1C99AF0700174823 /* StoryboardViewController.swift */,
128137
);
129138
path = Example;
130139
sourceTree = "<group>";
@@ -154,12 +163,12 @@
154163
isa = PBXNativeTarget;
155164
buildConfigurationList = B5E9F90D1C8D3B6E00443DC7 /* Build configuration list for PBXNativeTarget "Example" */;
156165
buildPhases = (
157-
96705876C946719953BCD0C6 /* Check Pods Manifest.lock */,
166+
96705876C946719953BCD0C6 /* [CP] Check Pods Manifest.lock */,
158167
B5E9F8F71C8D3B6E00443DC7 /* Sources */,
159168
B5E9F8F81C8D3B6E00443DC7 /* Frameworks */,
160169
B5E9F8F91C8D3B6E00443DC7 /* Resources */,
161-
CAB3B20531AAE2438C48D751 /* Embed Pods Frameworks */,
162-
7B2FB96C7361D5883F3ADD14 /* Copy Pods Resources */,
170+
CAB3B20531AAE2438C48D751 /* [CP] Embed Pods Frameworks */,
171+
7B2FB96C7361D5883F3ADD14 /* [CP] Copy Pods Resources */,
163172
B5C50ADD1C917F4A0059032B /* Swift Lint */,
164173
);
165174
buildRules = (
@@ -224,35 +233,36 @@
224233
B5E9F9061C8D3B6E00443DC7 /* Assets.xcassets in Resources */,
225234
B548C5A71C8D55A8009D5AEE /* InfoPlist.strings in Resources */,
226235
B5E9F9091C8D3B6E00443DC7 /* LaunchScreen.storyboard in Resources */,
236+
B5D04CFE1C99A7C900174823 /* Main.storyboard in Resources */,
227237
);
228238
runOnlyForDeploymentPostprocessing = 0;
229239
};
230240
/* End PBXResourcesBuildPhase section */
231241

232242
/* Begin PBXShellScriptBuildPhase section */
233-
7B2FB96C7361D5883F3ADD14 /* Copy Pods Resources */ = {
243+
7B2FB96C7361D5883F3ADD14 /* [CP] Copy Pods Resources */ = {
234244
isa = PBXShellScriptBuildPhase;
235245
buildActionMask = 2147483647;
236246
files = (
237247
);
238248
inputPaths = (
239249
);
240-
name = "Copy Pods Resources";
250+
name = "[CP] Copy Pods Resources";
241251
outputPaths = (
242252
);
243253
runOnlyForDeploymentPostprocessing = 0;
244254
shellPath = /bin/sh;
245255
shellScript = "\"${SRCROOT}/../Pods/Target Support Files/Pods-Example/Pods-Example-resources.sh\"\n";
246256
showEnvVarsInLog = 0;
247257
};
248-
96705876C946719953BCD0C6 /* Check Pods Manifest.lock */ = {
258+
96705876C946719953BCD0C6 /* [CP] Check Pods Manifest.lock */ = {
249259
isa = PBXShellScriptBuildPhase;
250260
buildActionMask = 2147483647;
251261
files = (
252262
);
253263
inputPaths = (
254264
);
255-
name = "Check Pods Manifest.lock";
265+
name = "[CP] Check Pods Manifest.lock";
256266
outputPaths = (
257267
);
258268
runOnlyForDeploymentPostprocessing = 0;
@@ -274,14 +284,14 @@
274284
shellPath = /bin/sh;
275285
shellScript = "if which swiftlint >/dev/null; then swiftlint; fi";
276286
};
277-
CAB3B20531AAE2438C48D751 /* Embed Pods Frameworks */ = {
287+
CAB3B20531AAE2438C48D751 /* [CP] Embed Pods Frameworks */ = {
278288
isa = PBXShellScriptBuildPhase;
279289
buildActionMask = 2147483647;
280290
files = (
281291
);
282292
inputPaths = (
283293
);
284-
name = "Embed Pods Frameworks";
294+
name = "[CP] Embed Pods Frameworks";
285295
outputPaths = (
286296
);
287297
runOnlyForDeploymentPostprocessing = 0;
@@ -296,7 +306,8 @@
296306
isa = PBXSourcesBuildPhase;
297307
buildActionMask = 2147483647;
298308
files = (
299-
B548C5C51C8E91B0009D5AEE /* ICInputAccessoryUITests.swift in Sources */,
309+
B5F62A5D1C9ECBCB003A1231 /* ICKeyboardDismissTextFieldUITests.swift in Sources */,
310+
B548C5C51C8E91B0009D5AEE /* ICTokenFieldUITests.swift in Sources */,
300311
);
301312
runOnlyForDeploymentPostprocessing = 0;
302313
};
@@ -309,6 +320,7 @@
309320
B5C53E191C92851400AF3489 /* CustomizedTokenViewController.swift in Sources */,
310321
B548C5A91C8D6150009D5AEE /* ExampleCell.swift in Sources */,
311322
B5E9F9011C8D3B6E00443DC7 /* ExampleViewController.swift in Sources */,
323+
B5D04D001C99AF0700174823 /* StoryboardViewController.swift in Sources */,
312324
);
313325
runOnlyForDeploymentPostprocessing = 0;
314326
};

Example/Example/CustomizedTokenViewController.swift

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class CustomizedTokenViewController: UIViewController, ICTokenFieldDelegate {
5050
navigationController?.navigationBar.translucent = false
5151
navigationController?.navigationBar.barStyle = .Black
5252

53-
let cancelBarButton = UIBarButtonItem(barButtonSystemItem: .Cancel, target: self, action: Selector("dismiss:"))
53+
let cancelBarButton = UIBarButtonItem(barButtonSystemItem: .Cancel, target: self, action: .dismiss)
5454
cancelBarButton.tintColor = UIColor.whiteColor()
5555
navigationItem.rightBarButtonItem = cancelBarButton
5656

@@ -72,15 +72,15 @@ class CustomizedTokenViewController: UIViewController, ICTokenFieldDelegate {
7272
// MARK: - ICTokenFieldDelegate
7373

7474
func tokenFieldDidBeginEditing(tokenField: ICTokenField) {
75-
print(__FUNCTION__)
75+
print(#function)
7676
}
7777

7878
func tokenFieldDidEndEditing(tokenField: ICTokenField) {
79-
print(__FUNCTION__)
79+
print(#function)
8080
}
8181

8282
func tokenFieldWillReturn(tokenField: ICTokenField) {
83-
print(__FUNCTION__)
83+
print(#function)
8484
}
8585

8686
func tokenField(tokenField: ICTokenField, didEnterText text: String) {
@@ -95,7 +95,7 @@ class CustomizedTokenViewController: UIViewController, ICTokenFieldDelegate {
9595

9696
// MARK: - UIResponder Callbacks
9797

98-
@IBAction private func dismiss(sender: UIBarButtonItem) {
98+
@objc private func dismiss(sender: UIBarButtonItem) {
9999
presentingViewController?.dismissViewControllerAnimated(true, completion: nil)
100100
}
101101

@@ -106,3 +106,11 @@ class CustomizedTokenViewController: UIViewController, ICTokenFieldDelegate {
106106
}
107107

108108
}
109+
110+
111+
////////////////////////////////////////////////////////////////////////////////
112+
113+
114+
private extension Selector {
115+
static let dismiss = #selector(CustomizedTokenViewController.dismiss(_:))
116+
}

Example/Example/ExampleViewController.swift

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ class ExampleViewController: UITableViewController {
3535
CustomizedTokenField.self
3636
]
3737

38+
private lazy var flipButton: UIButton = {
39+
let _button = UIButton(type: .System)
40+
_button.frame = CGRect(x: 0, y: 0, width: UIScreen.mainScreen().bounds.width, height: 88)
41+
_button.setTitle("Storyboard", forState: .Normal)
42+
_button.addTarget(self, action: .showStoryboard, forControlEvents: .TouchUpInside)
43+
return _button
44+
}()
45+
3846
// MARK: - Initialization
3947

4048
convenience init() {
@@ -47,6 +55,8 @@ class ExampleViewController: UITableViewController {
4755
override func loadView() {
4856
super.loadView()
4957
tableView.registerClass(ExampleCell.self, forCellReuseIdentifier: NSStringFromClass(ExampleCell.self))
58+
tableView.tableFooterView = flipButton
59+
tableView.tableFooterView?.userInteractionEnabled
5060
}
5161

5262
// MARK: - UITableViewDataSource
@@ -113,4 +123,21 @@ class ExampleViewController: UITableViewController {
113123
}
114124
}
115125

126+
// MARK: - UIResponder Callbacks
127+
128+
@objc private func showStoryboard(sender: UIButton) {
129+
if let controller = UIStoryboard(name: "Main", bundle: NSBundle.mainBundle()).instantiateInitialViewController() {
130+
controller.modalTransitionStyle = .FlipHorizontal
131+
presentViewController(controller, animated: true, completion: nil)
132+
}
133+
}
134+
135+
}
136+
137+
138+
////////////////////////////////////////////////////////////////////////////////
139+
140+
141+
private extension Selector {
142+
static let showStoryboard = #selector(ExampleViewController.showStoryboard(_:))
116143
}

Example/Example/Info.plist

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
<key>CFBundlePackageType</key>
1616
<string>APPL</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>1.0.0</string>
18+
<string>1.1.0</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>
22-
<string>1</string>
22+
<string>101</string>
2323
<key>LSRequiresIPhoneOS</key>
2424
<true/>
2525
<key>UILaunchStoryboardName</key>
@@ -28,11 +28,14 @@
2828
<array>
2929
<string>armv7</string>
3030
</array>
31+
<key>UIRequiresFullScreen</key>
32+
<false/>
3133
<key>UISupportedInterfaceOrientations</key>
3234
<array>
3335
<string>UIInterfaceOrientationPortrait</string>
3436
<string>UIInterfaceOrientationLandscapeLeft</string>
3537
<string>UIInterfaceOrientationLandscapeRight</string>
38+
<string>UIInterfaceOrientationPortraitUpsideDown</string>
3639
</array>
3740
</dict>
3841
</plist>

0 commit comments

Comments
 (0)