Skip to content

Commit ca5125a

Browse files
committed
Merge branch 'release/1.4.0'
2 parents 716d0fb + 207327b commit ca5125a

File tree

14 files changed

+125
-56
lines changed

14 files changed

+125
-56
lines changed

.jazzy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ github_url: https://github.com/polydice/ICInputAccessory
55
github_file_prefix: https://github.com/polydice/ICInputAccessory/blob/develop
66
xcodebuild_arguments: [-project, ICInputAccessory.xcodeproj, -scheme, ICInputAccessory-iOS]
77
module: ICInputAccessory
8-
module_version: 1.3.0
8+
module_version: 1.4.0
99
output: docs/output
1010
theme: fullwidth

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ script:
1515
- bundle exec rake ci:build
1616
- make -B carthage
1717
- make -B docs
18+
after_script:
19+
- sh scripts/update-docs.sh
1820
notifications:
1921
email: false
2022
slack:

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
## v1.4.0
2+
3+
* Added delegate methods:
4+
5+
```swift
6+
@objc optional func tokenField(_ tokenField: ICTokenField, didChangeInputText text: String)
7+
@objc optional func tokenField(_ tokenField: ICTokenField, shouldCompleteText text: String) -> Bool
8+
@objc optional func tokenField(_ tokenField: ICTokenField, subsequentDelimiterForCompletedText text: String) -> String
9+
```
10+
11+
* Renamed delegate method:
12+
13+
```swift
14+
@objc optional func tokenField(_ tokenField: ICTokenField, didCompleteText text: String)
15+
```
16+
117
## v1.3.0
218

319
* Swift 3.0

Example/CustomizedTokenViewController.swift

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ class CustomizedTokenViewController: UIViewController, ICTokenFieldDelegate {
3737
override func loadView() {
3838
super.loadView()
3939
view.backgroundColor = UIColor.white
40+
textView.isEditable = false
41+
textView.isSelectable = false
4042
textView.text = "[\n\n]"
4143
textView.font = UIFont.preferredFont(forTextStyle: .subheadline)
4244
textView.frame = view.bounds.insetBy(dx: 10, dy: 10)
@@ -83,16 +85,29 @@ class CustomizedTokenViewController: UIViewController, ICTokenFieldDelegate {
8385
print(#function)
8486
}
8587

86-
func tokenField(_ tokenField: ICTokenField, didEnterText text: String) {
87-
print("Add: \"\(text)\"")
88+
func tokenField(_ tokenField: ICTokenField, didChangeInputText text: String) {
89+
print("Typing \"\(text)\"")
90+
}
91+
92+
func tokenField(_ tokenField: ICTokenField, shouldCompleteText text: String) -> Bool {
93+
print("Should add \"\(text)\"?")
94+
return text != "42"
95+
}
96+
97+
func tokenField(_ tokenField: ICTokenField, didCompleteText text: String) {
98+
print("Added \"\(text)\"")
8899
updateTexts()
89100
}
90101

91102
func tokenField(_ tokenField: ICTokenField, didDeleteText text: String, atIndex index: Int) {
92-
print("Delete: \"\(text)\"")
103+
print("Deleted \"\(text)\"")
93104
updateTexts()
94105
}
95106

107+
func tokenField(_ tokenField: ICTokenField, subsequentDelimiterForCompletedText text: String) -> String {
108+
return " ,"
109+
}
110+
96111
// MARK: - UIResponder Callbacks
97112

98113
@objc fileprivate func dismiss(_ sender: UIBarButtonItem) {

Example/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>APPL</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>1.3.0</string>
18+
<string>1.4.0</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

ICInputAccessory.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "ICInputAccessory"
3-
s.version = "1.3.0"
3+
s.version = "1.4.0"
44
s.summary = "A customized token text field used in the iCook app."
55
s.description = <<-DESC
66
ICKeyboardDismissTextField:

ICInputAccessory/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>1.3.0</string>
18+
<string>1.4.0</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

ICInputAccessoryUITests/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>BNDL</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>1.3.0</string>
18+
<string>1.4.0</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
install: brew-install bundle-install pod-install
22

33
brew-install:
4-
brew update
54
brew tap homebrew/bundle
65
brew bundle
76

@@ -11,7 +10,10 @@ bundle-install:
1110
pod-install:
1211
bundle exec pod install --no-repo-update
1312

14-
setup: brew-install
13+
bootstrap:
14+
brew tap homebrew/bundle
15+
brew bundle
16+
gem install bundler
1517
bundle install
1618
bundle exec pod install --no-repo-update
1719

Podfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
PODS:
2-
- ICInputAccessory/KeyboardDismissTextField (1.3.0)
3-
- ICInputAccessory/TokenField (1.3.0)
2+
- ICInputAccessory/KeyboardDismissTextField (1.4.0)
3+
- ICInputAccessory/TokenField (1.4.0)
44

55
DEPENDENCIES:
66
- ICInputAccessory/KeyboardDismissTextField (from `./`)
@@ -11,7 +11,7 @@ EXTERNAL SOURCES:
1111
:path: "./"
1212

1313
SPEC CHECKSUMS:
14-
ICInputAccessory: e9142958152461ddb627e78e3f1f0a8b263b7271
14+
ICInputAccessory: dace41bea1ed8b0368bf8ffd439a215efa8effd3
1515

1616
PODFILE CHECKSUM: 6e8fb9f23fc92d92278fbf08ca8ef072ef28a486
1717

0 commit comments

Comments
 (0)