@@ -269,7 +269,7 @@ open class ICTokenField: UIView, UITextFieldDelegate, ICBackspaceTextFieldDelega
269
269
// MARK: - UITextFieldDelegate
270
270
271
271
open func textFieldShouldBeginEditing( _ textField: UITextField ) -> Bool {
272
- tokens. forEach { $0. highlighted = false }
272
+ tokens. forEach { $0. isHighlighted = false }
273
273
return true
274
274
}
275
275
@@ -280,7 +280,7 @@ open class ICTokenField: UIView, UITextFieldDelegate, ICBackspaceTextFieldDelega
280
280
open func textFieldDidEndEditing( _ textField: UITextField ) {
281
281
completeCurrentInputText ( )
282
282
togglePlaceholderIfNeeded ( )
283
- tokens. forEach { $0. highlighted = false }
283
+ tokens. forEach { $0. isHighlighted = false }
284
284
delegate? . tokenFieldDidEndEditing ? ( self )
285
285
}
286
286
@@ -339,7 +339,7 @@ open class ICTokenField: UIView, UITextFieldDelegate, ICBackspaceTextFieldDelega
339
339
340
340
if let text = textField. text, text. isEmpty {
341
341
textField. showsCursor = false
342
- tokens. last? . highlighted = true
342
+ tokens. last? . isHighlighted = true
343
343
}
344
344
return true
345
345
}
@@ -363,10 +363,10 @@ open class ICTokenField: UIView, UITextFieldDelegate, ICBackspaceTextFieldDelega
363
363
for token in tokens {
364
364
if token. frame. contains ( touch) {
365
365
scrollView. scrollRectToVisible ( token. frame, animated: true )
366
- token. highlighted = true
366
+ token. isHighlighted = true
367
367
shouldFocusInputTextField = false
368
368
} else {
369
- token. highlighted = false
369
+ token. isHighlighted = false
370
370
}
371
371
}
372
372
@@ -385,7 +385,7 @@ open class ICTokenField: UIView, UITextFieldDelegate, ICBackspaceTextFieldDelega
385
385
386
386
/// Returns true if any highlighted token is found and removed, otherwise false.
387
387
private func removeHighlightedToken( ) -> Bool {
388
- for (index, token) in tokens. enumerated ( ) where token. highlighted {
388
+ for (index, token) in tokens. enumerated ( ) where token. isHighlighted {
389
389
tokens. remove ( at: index)
390
390
layoutTokenTextField ( )
391
391
togglePlaceholderIfNeeded ( )
0 commit comments