Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
18 changes: 9 additions & 9 deletions Example/Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -163,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 @@ -240,29 +240,29 @@
/* 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 @@ -284,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 Down
10 changes: 9 additions & 1 deletion 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 Down Expand Up @@ -106,3 +106,11 @@ class CustomizedTokenViewController: UIViewController, ICTokenFieldDelegate {
}

}


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


private extension Selector {
static let dismiss = #selector(CustomizedTokenViewController.dismiss(_:))
}
10 changes: 9 additions & 1 deletion Example/Example/ExampleViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class ExampleViewController: UITableViewController {
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: #selector(showStoryboard(_:)), forControlEvents: .TouchUpInside)
_button.addTarget(self, action: .showStoryboard, forControlEvents: .TouchUpInside)
return _button
}()

Expand Down Expand Up @@ -133,3 +133,11 @@ class ExampleViewController: UITableViewController {
}

}


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


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>
2 changes: 1 addition & 1 deletion Example/ICInputAccessoryUITests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>1.1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source "http://rubygems.org"
ruby "2.3.1"

gem "cocoapods", "1.0.0"
gem "cocoapods", "~> 1.0.0"
gem "pry"
gem "rake"
gem "xcpretty"
31 changes: 15 additions & 16 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
GEM
remote: http://rubygems.org/
specs:
activesupport (4.2.6)
activesupport (5.0.0)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
claide (1.0.0)
cocoapods (1.0.0)
cocoapods (1.0.1)
activesupport (>= 4.0.2)
claide (>= 1.0.0, < 2.0)
cocoapods-core (= 1.0.0)
cocoapods-core (= 1.0.1)
cocoapods-deintegrate (>= 1.0.0, < 2.0)
cocoapods-downloader (>= 1.0.0, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
Expand All @@ -24,44 +23,44 @@ GEM
fourflusher (~> 0.3.0)
molinillo (~> 0.4.5)
nap (~> 1.0)
xcodeproj (>= 1.0.0, < 2.0)
cocoapods-core (1.0.0)
xcodeproj (>= 1.1.0, < 2.0)
cocoapods-core (1.0.1)
activesupport (>= 4.0.2)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
cocoapods-deintegrate (1.0.0)
cocoapods-downloader (1.0.0)
cocoapods-downloader (1.1.0)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.0)
cocoapods-stats (1.0.0)
cocoapods-trunk (1.0.0)
nap (>= 0.8, < 2.0)
netrc (= 0.7.8)
cocoapods-try (1.0.0)
cocoapods-try (1.1.0)
coderay (1.1.1)
colored (1.2)
concurrent-ruby (1.0.2)
escape (0.0.4)
fourflusher (0.3.1)
fourflusher (0.3.2)
fuzzy_match (2.0.4)
i18n (0.7.0)
json (1.8.3)
method_source (0.8.2)
minitest (5.9.0)
molinillo (0.4.5)
nap (1.1.0)
netrc (0.7.8)
pry (0.10.3)
pry (0.10.4)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
rake (11.1.2)
rouge (1.10.1)
rake (11.2.2)
rouge (1.11.1)
slop (3.6.0)
thread_safe (0.3.5)
tzinfo (1.2.2)
thread_safe (~> 0.1)
xcodeproj (1.0.0)
xcodeproj (1.2.0)
activesupport (>= 3)
claide (>= 1.0.0, < 2.0)
colored (~> 1.2)
Expand All @@ -72,7 +71,7 @@ PLATFORMS
ruby

DEPENDENCIES
cocoapods (= 1.0.0)
cocoapods (~> 1.0.0)
pry
rake
xcpretty
Expand Down
2 changes: 1 addition & 1 deletion ICInputAccessory.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "ICInputAccessory"
s.version = "1.0.0"
s.version = "1.1.0"
s.summary = "A customized token text field used in the iCook app."
s.description = <<-DESC
ICKeyboardDismissTextField:
Expand Down
2 changes: 1 addition & 1 deletion ICInputAccessory/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0</string>
<string>1.1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
8 changes: 4 additions & 4 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PODS:
- ICInputAccessory/KeyboardDismissTextField (1.0.0)
- ICInputAccessory/TokenField (1.0.0)
- ICInputAccessory/KeyboardDismissTextField (1.1.0)
- ICInputAccessory/TokenField (1.1.0)

DEPENDENCIES:
- ICInputAccessory/KeyboardDismissTextField (from `./`)
Expand All @@ -11,8 +11,8 @@ EXTERNAL SOURCES:
:path: "./"

SPEC CHECKSUMS:
ICInputAccessory: e3c0705263aa7c86cebf96425c95aa716ec83f25
ICInputAccessory: fa69a534ae8811866fa9d63a6b3ecf07bfced685

PODFILE CHECKSUM: bc37f46eb6efd595acab704850534a8198e06d74

COCOAPODS: 1.0.0
COCOAPODS: 1.0.1
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@ Try <https://testflight.icook.tw>.

ICInputAccessory | iOS | Xcode | Swift
---------------- | :--: | :---: | -----
v1.0.0 | 8.0+ | 7.2 | ![Swift 2.1.1](https://img.shields.io/badge/Swift-2.1.1-orange.svg)
v1.1.0 | 8.0+ | 7.3 | ![Swift 2.2](https://img.shields.io/badge/Swift-2.2-orange.svg)

iOS 8.0+ with Xcode 7.2 or above.
`~> v1.0.0` | 8.0+ | 7.2 | ![Swift 2.1.1](https://img.shields.io/badge/Swift-2.1.1-orange.svg)
`~> v1.1.0` | 8.0+ | 7.3 | ![Swift 2.2](https://img.shields.io/badge/Swift-2.2-orange.svg)

## Installation

Expand Down Expand Up @@ -136,15 +134,19 @@ See `Example/CustomizedTokenField.swift` for more details.

## Development

Meke sure you have [Homebrew](http://brew.sh/) installed, then run in the project root:
* Meke sure [Homebrew](http://brew.sh/) is installed.
* Current `develop` branch requires Ruby `2.3.1`.
* Set up dependencies by running the following command in the project root:

```
```
make setup
```

Tasks for testing:
* Open **ICInputAccessory.xcworkspace** and run the demo app with the `Example` scheme.

```
* See more tasks for building and testing:

```
rake -T
```

Expand Down
7 changes: 7 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
task default: "ci:test"

namespace :ci do
desc "Build targets on Travis CI with a specified OS version, default OS=latest"
task :build, [:os] do |t, args|
version = args[:os] || "latest"
Rake::Task["framework:build"].invoke version
Rake::Task["example:build"].invoke version
end

desc "Run tests on Travis CI with a specified OS version, default OS=latest"
task :test, [:os] do |t, args|
version = args[:os] || "latest"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class ICKeyboardDismissTextField: UITextField {
@IBOutlet public var keyboardAccessoryView: ICKeyboardDismissAccessoryView! {
didSet {
if UI_USER_INTERFACE_IDIOM() != .Phone { return }
keyboardAccessoryView.dismissButton.addTarget(self, action: #selector(dismiss(_:)), forControlEvents: .TouchUpInside)
keyboardAccessoryView.dismissButton.addTarget(self, action: .dismiss, forControlEvents: .TouchUpInside)
inputAccessoryView = keyboardAccessoryView
}
}
Expand Down Expand Up @@ -74,3 +74,11 @@ public class ICKeyboardDismissTextField: UITextField {
}

}


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


private extension Selector {
static let dismiss = #selector(ICKeyboardDismissTextField.dismiss(_:))
}
Loading