Skip to content

Commit 8031774

Browse files
authored
Merge pull request #21 from polydice/feature/swift-4
Swift 4
2 parents c05c79d + 0167a30 commit 8031774

23 files changed

+136
-107
lines changed

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.4.1
1+
2.4.3

.swift-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.1
1+
4.0

.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: xcode8.3
2+
osx_image: xcode9
33
cache:
44
bundler: true
55
directories:
@@ -8,7 +8,7 @@ cache:
88
before_install:
99
- export LANG=en_US.UTF-8
1010
- xcrun instruments -s devices
11-
- xcrun instruments -w "iPhone 7 (10.3.1) [" || true
11+
- xcrun instruments -w "iPhone 8 (11.0) [" || true
1212
install:
1313
- make install
1414
before_script:

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## v1.5.0
2+
3+
* Swift 4.0
4+
15
## v1.4.1
26

37
* Fix `tokenField(_:didChangeInputText:)` with the delete key [#20](https://github.com/polydice/ICInputAccessory/pull/20)

Example/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
3131

3232
var window: UIWindow?
3333

34-
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool {
34+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]? = nil) -> Bool {
3535
window = UIWindow(frame: UIScreen.main.bounds)
3636
window?.backgroundColor = UIColor.white
3737
window?.rootViewController = UINavigationController(rootViewController: ExampleViewController())

Example/CustomizedTokenField.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ extension ICTokenField {
5757
layer.cornerRadius = 5
5858
layer.shouldRasterize = true
5959
layer.rasterizationScale = UIScreen.main.scale
60-
backgroundColor = UIColor(red:0.8, green:0.32, blue:0.24, alpha:1)
60+
backgroundColor = UIColor(red: 0.8, green: 0.32, blue: 0.24, alpha: 1)
6161

6262
textField.textColor = UIColor.white
6363
textField.tintColor = UIColor.white
@@ -66,21 +66,21 @@ extension ICTokenField {
6666
attributedPlaceholder = NSAttributedString(
6767
string: String(describing: type(of: self)),
6868
attributes: [
69-
NSForegroundColorAttributeName: UIColor.white.withAlphaComponent(0.5),
70-
NSFontAttributeName: UIFont.boldSystemFont(ofSize: 14)
69+
.foregroundColor: UIColor.white.withAlphaComponent(0.5),
70+
.font: UIFont.boldSystemFont(ofSize: 14)
7171
]
7272
)
7373

7474
normalTokenAttributes = [
75-
NSForegroundColorAttributeName: UIColor.white,
76-
NSBackgroundColorAttributeName: UIColor.white.withAlphaComponent(0.25),
77-
NSFontAttributeName: UIFont.boldSystemFont(ofSize: 14)
75+
.foregroundColor: UIColor.white,
76+
.backgroundColor: UIColor.white.withAlphaComponent(0.25),
77+
.font: UIFont.boldSystemFont(ofSize: 14)
7878
]
7979

8080
highlightedTokenAttributes = [
81-
NSForegroundColorAttributeName: UIColor(red:0.8, green:0.32, blue:0.24, alpha:1),
82-
NSBackgroundColorAttributeName: UIColor.white,
83-
NSFontAttributeName: UIFont.boldSystemFont(ofSize: 14)
81+
.foregroundColor: UIColor(red: 0.8, green: 0.32, blue: 0.24, alpha: 1),
82+
.backgroundColor: UIColor.white,
83+
.font: UIFont.boldSystemFont(ofSize: 14)
8484
]
8585
}
8686

Example/CustomizedTokenViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class CustomizedTokenViewController: UIViewController, ICTokenFieldDelegate {
4848

4949
override func viewDidLoad() {
5050
super.viewDidLoad()
51-
navigationController?.navigationBar.barTintColor = UIColor(red:0.96, green:0.48, blue:0.4, alpha:1)
51+
navigationController?.navigationBar.barTintColor = UIColor(red: 0.96, green: 0.48, blue: 0.4, alpha: 1)
5252
navigationController?.navigationBar.isTranslucent = false
5353
navigationController?.navigationBar.barStyle = .black
5454

Example/StoryboardViewController.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ class StoryboardViewController: UITableViewController {
3232
@IBOutlet weak var tokenField: ICTokenField! {
3333
didSet {
3434
tokenField.normalTokenAttributes = [
35-
NSForegroundColorAttributeName: UIColor.white,
36-
NSBackgroundColorAttributeName: UIColor.white.withAlphaComponent(0.25)
35+
.foregroundColor: UIColor.white,
36+
.backgroundColor: UIColor.white.withAlphaComponent(0.25)
3737
]
3838

3939
tokenField.highlightedTokenAttributes = [
40-
NSForegroundColorAttributeName: UIColor.darkGray,
41-
NSBackgroundColorAttributeName: UIColor.white
40+
.foregroundColor: UIColor.darkGray,
41+
.backgroundColor: UIColor.white
4242
]
4343
}
4444
}

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ source "http://rubygems.org"
22

33
gem "cocoapods"
44
gem "danger"
5-
gem "jazzy", "~> 0.8.0"
5+
gem "jazzy", ">= 0.8.0"
66
gem "pry"
77
gem "rake"
88
gem "xcpretty"

Gemfile.lock

Lines changed: 42 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,58 @@
11
GEM
22
remote: http://rubygems.org/
33
specs:
4-
CFPropertyList (2.3.5)
5-
activesupport (4.2.9)
4+
CFPropertyList (2.3.6)
5+
activesupport (4.2.10)
66
i18n (~> 0.7)
77
minitest (~> 5.1)
88
thread_safe (~> 0.3, >= 0.3.4)
99
tzinfo (~> 1.1)
10-
addressable (2.5.1)
11-
public_suffix (~> 2.0, >= 2.0.2)
10+
addressable (2.5.2)
11+
public_suffix (>= 2.0.2, < 4.0)
1212
claide (1.0.2)
1313
claide-plugins (0.9.2)
1414
cork
1515
nap
1616
open4 (~> 1.3)
17-
cocoapods (1.3.1)
17+
cocoapods (1.4.0)
1818
activesupport (>= 4.0.2, < 5)
1919
claide (>= 1.0.2, < 2.0)
20-
cocoapods-core (= 1.3.1)
21-
cocoapods-deintegrate (>= 1.0.1, < 2.0)
20+
cocoapods-core (= 1.4.0)
21+
cocoapods-deintegrate (>= 1.0.2, < 2.0)
2222
cocoapods-downloader (>= 1.1.3, < 2.0)
2323
cocoapods-plugins (>= 1.0.0, < 2.0)
2424
cocoapods-search (>= 1.0.0, < 2.0)
2525
cocoapods-stats (>= 1.0.0, < 2.0)
26-
cocoapods-trunk (>= 1.2.0, < 2.0)
26+
cocoapods-trunk (>= 1.3.0, < 2.0)
2727
cocoapods-try (>= 1.1.0, < 2.0)
2828
colored2 (~> 3.1)
2929
escape (~> 0.0.4)
3030
fourflusher (~> 2.0.1)
3131
gh_inspector (~> 1.0)
32-
molinillo (~> 0.5.7)
32+
molinillo (~> 0.6.4)
3333
nap (~> 1.0)
3434
ruby-macho (~> 1.1)
35-
xcodeproj (>= 1.5.1, < 2.0)
36-
cocoapods-core (1.3.1)
35+
xcodeproj (>= 1.5.4, < 2.0)
36+
cocoapods-core (1.4.0)
3737
activesupport (>= 4.0.2, < 6)
3838
fuzzy_match (~> 2.0.4)
3939
nap (~> 1.0)
40-
cocoapods-deintegrate (1.0.1)
40+
cocoapods-deintegrate (1.0.2)
4141
cocoapods-downloader (1.1.3)
4242
cocoapods-plugins (1.0.0)
4343
nap
4444
cocoapods-search (1.0.0)
4545
cocoapods-stats (1.0.0)
46-
cocoapods-trunk (1.2.0)
46+
cocoapods-trunk (1.3.0)
4747
nap (>= 0.8, < 2.0)
48-
netrc (= 0.7.8)
48+
netrc (~> 0.11)
4949
cocoapods-try (1.1.0)
50-
coderay (1.1.1)
50+
coderay (1.1.2)
5151
colored2 (3.1.2)
52+
concurrent-ruby (1.0.5)
5253
cork (0.3.0)
5354
colored2 (~> 3.1)
54-
danger (5.3.4)
55+
danger (5.5.6)
5556
claide (~> 1.0)
5657
claide-plugins (>= 0.9.2)
5758
colored2 (~> 3.1)
@@ -60,10 +61,11 @@ GEM
6061
faraday-http-cache (~> 1.0)
6162
git (~> 1)
6263
kramdown (~> 1.5)
64+
no_proxy_fix
6365
octokit (~> 4.7)
6466
terminal-table (~> 1)
6567
escape (0.0.4)
66-
faraday (0.13.0)
68+
faraday (0.14.0)
6769
multipart-post (>= 1.2, < 3)
6870
faraday-http-cache (1.3.1)
6971
faraday (~> 0.8)
@@ -72,77 +74,77 @@ GEM
7274
fuzzy_match (2.0.4)
7375
gh_inspector (1.0.3)
7476
git (1.3.0)
75-
i18n (0.8.6)
76-
jazzy (0.8.3)
77+
i18n (0.9.1)
78+
concurrent-ruby (~> 1.0)
79+
jazzy (0.9.1)
7780
cocoapods (~> 1.0)
7881
mustache (~> 0.99)
7982
open4
8083
redcarpet (~> 3.2)
81-
rouge (~> 1.5)
84+
rouge (>= 2.0.6, < 4.0)
8285
sass (~> 3.4)
8386
sqlite3 (~> 1.3)
8487
xcinvoke (~> 0.3.0)
85-
kramdown (1.14.0)
88+
kramdown (1.16.2)
8689
liferaft (0.0.6)
87-
method_source (0.8.2)
88-
minitest (5.10.3)
89-
molinillo (0.5.7)
90+
method_source (0.9.0)
91+
minitest (5.11.1)
92+
molinillo (0.6.4)
9093
multipart-post (2.0.0)
9194
mustache (0.99.8)
9295
nanaimo (0.2.3)
9396
nap (1.1.0)
94-
netrc (0.7.8)
95-
octokit (4.7.0)
97+
netrc (0.11.0)
98+
no_proxy_fix (0.1.2)
99+
octokit (4.8.0)
96100
sawyer (~> 0.8.0, >= 0.5.3)
97101
open4 (1.3.4)
98-
pry (0.10.4)
102+
pry (0.11.3)
99103
coderay (~> 1.1.0)
100-
method_source (~> 0.8.1)
101-
slop (~> 3.4)
102-
public_suffix (2.0.5)
103-
rake (12.0.0)
104+
method_source (~> 0.9.0)
105+
public_suffix (3.0.1)
106+
rake (12.3.0)
104107
rb-fsevent (0.10.2)
105108
rb-inotify (0.9.10)
106109
ffi (>= 0.5.0, < 2)
107110
redcarpet (3.4.0)
108-
rouge (1.11.1)
111+
rouge (2.0.7)
109112
ruby-macho (1.1.0)
110-
sass (3.5.1)
113+
sass (3.5.5)
111114
sass-listen (~> 4.0.0)
112115
sass-listen (4.0.0)
113116
rb-fsevent (~> 0.9, >= 0.9.4)
114117
rb-inotify (~> 0.9, >= 0.9.7)
115118
sawyer (0.8.1)
116119
addressable (>= 2.3.5, < 2.6)
117120
faraday (~> 0.8, < 1.0)
118-
slop (3.6.0)
119121
sqlite3 (1.3.13)
120122
terminal-table (1.8.0)
121123
unicode-display_width (~> 1.1, >= 1.1.1)
122124
thread_safe (0.3.6)
123-
tzinfo (1.2.3)
125+
tzinfo (1.2.4)
124126
thread_safe (~> 0.1)
125127
unicode-display_width (1.3.0)
126128
xcinvoke (0.3.0)
127129
liferaft (~> 0.0.6)
128-
xcodeproj (1.5.1)
130+
xcodeproj (1.5.4)
129131
CFPropertyList (~> 2.3.3)
130132
claide (>= 1.0.2, < 2.0)
131133
colored2 (~> 3.1)
132134
nanaimo (~> 0.2.3)
133-
xcpretty (0.2.6)
134-
rouge (~> 1.8)
135+
xcpretty (0.2.8)
136+
rouge (~> 2.0.7)
135137

136138
PLATFORMS
137139
ruby
138140

139141
DEPENDENCIES
140142
cocoapods
141143
danger
142-
jazzy (~> 0.8.0)
144+
jazzy (>= 0.8.0)
143145
pry
144146
rake
145147
xcpretty
146148

147149
BUNDLED WITH
148-
1.15.3
150+
1.16.1

0 commit comments

Comments
 (0)