Skip to content

Commit

Permalink
Merge branch 'release/1.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
czars committed Aug 4, 2016
2 parents a69f2d7 + 613aa74 commit e9d37e9
Show file tree
Hide file tree
Showing 30 changed files with 608 additions and 147 deletions.
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.3.1
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: objective-c
osx_image: xcode7.2
osx_image: xcode7.3
env:
matrix:
- VERSION=8.4
Expand All @@ -16,7 +16,7 @@ install:
before_script:
- xcodebuild -workspace ICInputAccessory.xcworkspace -list
script:
- bundle exec rake ci:test[$VERSION]
- bundle exec rake ci:build[$VERSION]
notifications:
email: false
slack:
Expand Down
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
## v1.1.0

#### Changes

* Support storyboard
* Support subspecs
* Upgrade to Swift 2.2
* Use CocoaPods (1.0.1)

## v1.0.0

Initial release written in Swift 2.1.

#### Added
#### Changes

* `ICKeyboardDismissTextField` with an accessory view to dismiss keyboard.
* `ICTokenField`, a text field that groups input texts as tokens.
38 changes: 25 additions & 13 deletions Example/Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,15 @@
B52819581C90215C007D01D5 /* CustomizedTokenField.swift in Sources */ = {isa = PBXBuildFile; fileRef = B52819571C90215C007D01D5 /* CustomizedTokenField.swift */; };
B548C5A71C8D55A8009D5AEE /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = B548C5A51C8D55A8009D5AEE /* InfoPlist.strings */; };
B548C5A91C8D6150009D5AEE /* ExampleCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B548C5A81C8D6150009D5AEE /* ExampleCell.swift */; };
B548C5C51C8E91B0009D5AEE /* ICInputAccessoryUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B548C5C41C8E91B0009D5AEE /* ICInputAccessoryUITests.swift */; };
B548C5C51C8E91B0009D5AEE /* ICTokenFieldUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B548C5C41C8E91B0009D5AEE /* ICTokenFieldUITests.swift */; };
B5C53E191C92851400AF3489 /* CustomizedTokenViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5C53E181C92851400AF3489 /* CustomizedTokenViewController.swift */; };
B5D04CFE1C99A7C900174823 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B5D04CFD1C99A7C900174823 /* Main.storyboard */; };
B5D04D001C99AF0700174823 /* StoryboardViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5D04CFF1C99AF0700174823 /* StoryboardViewController.swift */; };
B5E9F8FF1C8D3B6E00443DC7 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5E9F8FE1C8D3B6E00443DC7 /* AppDelegate.swift */; };
B5E9F9011C8D3B6E00443DC7 /* ExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5E9F9001C8D3B6E00443DC7 /* ExampleViewController.swift */; };
B5E9F9061C8D3B6E00443DC7 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B5E9F9051C8D3B6E00443DC7 /* Assets.xcassets */; };
B5E9F9091C8D3B6E00443DC7 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B5E9F9071C8D3B6E00443DC7 /* LaunchScreen.storyboard */; };
B5F62A5D1C9ECBCB003A1231 /* ICKeyboardDismissTextFieldUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5F62A5C1C9ECBCB003A1231 /* ICKeyboardDismissTextFieldUITests.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand All @@ -34,15 +37,18 @@
B548C5A61C8D55A8009D5AEE /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/InfoPlist.strings; sourceTree = "<group>"; };
B548C5A81C8D6150009D5AEE /* ExampleCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExampleCell.swift; sourceTree = "<group>"; };
B548C5C21C8E91B0009D5AEE /* ICInputAccessoryUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ICInputAccessoryUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
B548C5C41C8E91B0009D5AEE /* ICInputAccessoryUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ICInputAccessoryUITests.swift; sourceTree = "<group>"; };
B548C5C41C8E91B0009D5AEE /* ICTokenFieldUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ICTokenFieldUITests.swift; sourceTree = "<group>"; };
B548C5C61C8E91B0009D5AEE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
B5C53E181C92851400AF3489 /* CustomizedTokenViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomizedTokenViewController.swift; sourceTree = "<group>"; };
B5D04CFD1C99A7C900174823 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = "<group>"; };
B5D04CFF1C99AF0700174823 /* StoryboardViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StoryboardViewController.swift; sourceTree = "<group>"; };
B5E9F8FB1C8D3B6E00443DC7 /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
B5E9F8FE1C8D3B6E00443DC7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
B5E9F9001C8D3B6E00443DC7 /* ExampleViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleViewController.swift; sourceTree = "<group>"; };
B5E9F9051C8D3B6E00443DC7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
B5E9F9081C8D3B6E00443DC7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
B5E9F90A1C8D3B6E00443DC7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
B5F62A5C1C9ECBCB003A1231 /* ICKeyboardDismissTextFieldUITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ICKeyboardDismissTextFieldUITests.swift; sourceTree = "<group>"; };
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>"; };
D0DB1D3E89AB75183DB104E0 /* Pods_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
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>"; };
Expand Down Expand Up @@ -87,7 +93,8 @@
B548C5C31C8E91B0009D5AEE /* ICInputAccessoryUITests */ = {
isa = PBXGroup;
children = (
B548C5C41C8E91B0009D5AEE /* ICInputAccessoryUITests.swift */,
B5F62A5C1C9ECBCB003A1231 /* ICKeyboardDismissTextFieldUITests.swift */,
B548C5C41C8E91B0009D5AEE /* ICTokenFieldUITests.swift */,
B548C5C61C8E91B0009D5AEE /* Info.plist */,
);
path = ICInputAccessoryUITests;
Expand Down Expand Up @@ -125,6 +132,8 @@
B5E9F90A1C8D3B6E00443DC7 /* Info.plist */,
B548C5A51C8D55A8009D5AEE /* InfoPlist.strings */,
B5E9F9071C8D3B6E00443DC7 /* LaunchScreen.storyboard */,
B5D04CFD1C99A7C900174823 /* Main.storyboard */,
B5D04CFF1C99AF0700174823 /* StoryboardViewController.swift */,
);
path = Example;
sourceTree = "<group>";
Expand Down Expand Up @@ -154,12 +163,12 @@
isa = PBXNativeTarget;
buildConfigurationList = B5E9F90D1C8D3B6E00443DC7 /* Build configuration list for PBXNativeTarget "Example" */;
buildPhases = (
96705876C946719953BCD0C6 /* Check Pods Manifest.lock */,
96705876C946719953BCD0C6 /* [CP] Check Pods Manifest.lock */,
B5E9F8F71C8D3B6E00443DC7 /* Sources */,
B5E9F8F81C8D3B6E00443DC7 /* Frameworks */,
B5E9F8F91C8D3B6E00443DC7 /* Resources */,
CAB3B20531AAE2438C48D751 /* Embed Pods Frameworks */,
7B2FB96C7361D5883F3ADD14 /* Copy Pods Resources */,
CAB3B20531AAE2438C48D751 /* [CP] Embed Pods Frameworks */,
7B2FB96C7361D5883F3ADD14 /* [CP] Copy Pods Resources */,
B5C50ADD1C917F4A0059032B /* Swift Lint */,
);
buildRules = (
Expand Down Expand Up @@ -224,35 +233,36 @@
B5E9F9061C8D3B6E00443DC7 /* Assets.xcassets in Resources */,
B548C5A71C8D55A8009D5AEE /* InfoPlist.strings in Resources */,
B5E9F9091C8D3B6E00443DC7 /* LaunchScreen.storyboard in Resources */,
B5D04CFE1C99A7C900174823 /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
7B2FB96C7361D5883F3ADD14 /* Copy Pods Resources */ = {
7B2FB96C7361D5883F3ADD14 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Copy Pods Resources";
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/../Pods/Target Support Files/Pods-Example/Pods-Example-resources.sh\"\n";
showEnvVarsInLog = 0;
};
96705876C946719953BCD0C6 /* Check Pods Manifest.lock */ = {
96705876C946719953BCD0C6 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Check Pods Manifest.lock";
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -274,14 +284,14 @@
shellPath = /bin/sh;
shellScript = "if which swiftlint >/dev/null; then swiftlint; fi";
};
CAB3B20531AAE2438C48D751 /* Embed Pods Frameworks */ = {
CAB3B20531AAE2438C48D751 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Embed Pods Frameworks";
name = "[CP] Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -296,7 +306,8 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
B548C5C51C8E91B0009D5AEE /* ICInputAccessoryUITests.swift in Sources */,
B5F62A5D1C9ECBCB003A1231 /* ICKeyboardDismissTextFieldUITests.swift in Sources */,
B548C5C51C8E91B0009D5AEE /* ICTokenFieldUITests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -309,6 +320,7 @@
B5C53E191C92851400AF3489 /* CustomizedTokenViewController.swift in Sources */,
B548C5A91C8D6150009D5AEE /* ExampleCell.swift in Sources */,
B5E9F9011C8D3B6E00443DC7 /* ExampleViewController.swift in Sources */,
B5D04D001C99AF0700174823 /* StoryboardViewController.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
18 changes: 13 additions & 5 deletions Example/Example/CustomizedTokenViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class CustomizedTokenViewController: UIViewController, ICTokenFieldDelegate {
navigationController?.navigationBar.translucent = false
navigationController?.navigationBar.barStyle = .Black

let cancelBarButton = UIBarButtonItem(barButtonSystemItem: .Cancel, target: self, action: Selector("dismiss:"))
let cancelBarButton = UIBarButtonItem(barButtonSystemItem: .Cancel, target: self, action: .dismiss)
cancelBarButton.tintColor = UIColor.whiteColor()
navigationItem.rightBarButtonItem = cancelBarButton

Expand All @@ -72,15 +72,15 @@ class CustomizedTokenViewController: UIViewController, ICTokenFieldDelegate {
// MARK: - ICTokenFieldDelegate

func tokenFieldDidBeginEditing(tokenField: ICTokenField) {
print(__FUNCTION__)
print(#function)
}

func tokenFieldDidEndEditing(tokenField: ICTokenField) {
print(__FUNCTION__)
print(#function)
}

func tokenFieldWillReturn(tokenField: ICTokenField) {
print(__FUNCTION__)
print(#function)
}

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

// MARK: - UIResponder Callbacks

@IBAction private func dismiss(sender: UIBarButtonItem) {
@objc private func dismiss(sender: UIBarButtonItem) {
presentingViewController?.dismissViewControllerAnimated(true, completion: nil)
}

Expand All @@ -106,3 +106,11 @@ class CustomizedTokenViewController: UIViewController, ICTokenFieldDelegate {
}

}


////////////////////////////////////////////////////////////////////////////////


private extension Selector {
static let dismiss = #selector(CustomizedTokenViewController.dismiss(_:))
}
27 changes: 27 additions & 0 deletions Example/Example/ExampleViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ class ExampleViewController: UITableViewController {
CustomizedTokenField.self
]

private lazy var flipButton: UIButton = {
let _button = UIButton(type: .System)
_button.frame = CGRect(x: 0, y: 0, width: UIScreen.mainScreen().bounds.width, height: 88)
_button.setTitle("Storyboard", forState: .Normal)
_button.addTarget(self, action: .showStoryboard, forControlEvents: .TouchUpInside)
return _button
}()

// MARK: - Initialization

convenience init() {
Expand All @@ -47,6 +55,8 @@ class ExampleViewController: UITableViewController {
override func loadView() {
super.loadView()
tableView.registerClass(ExampleCell.self, forCellReuseIdentifier: NSStringFromClass(ExampleCell.self))
tableView.tableFooterView = flipButton
tableView.tableFooterView?.userInteractionEnabled
}

// MARK: - UITableViewDataSource
Expand Down Expand Up @@ -113,4 +123,21 @@ class ExampleViewController: UITableViewController {
}
}

// MARK: - UIResponder Callbacks

@objc private func showStoryboard(sender: UIButton) {
if let controller = UIStoryboard(name: "Main", bundle: NSBundle.mainBundle()).instantiateInitialViewController() {
controller.modalTransitionStyle = .FlipHorizontal
presentViewController(controller, animated: true, completion: nil)
}
}

}


////////////////////////////////////////////////////////////////////////////////


private extension Selector {
static let showStoryboard = #selector(ExampleViewController.showStoryboard(_:))
}
7 changes: 5 additions & 2 deletions Example/Example/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0</string>
<string>1.1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>101</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
Expand All @@ -28,11 +28,14 @@
<array>
<string>armv7</string>
</array>
<key>UIRequiresFullScreen</key>
<false/>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
</dict>
</plist>
Loading

0 comments on commit e9d37e9

Please sign in to comment.