@@ -41,15 +41,13 @@ import UIKit
4141}
4242
4343
44- ////////////////////////////////////////////////////////////////////////////////
45-
46-
44+ /// A text field that groups input texts with delimiters.
4745@IBDesignable
4846public class ICTokenField : UIView , UITextFieldDelegate , ICBackspaceTextFieldDelegate {
4947
5048 // MARK: - Public Properties
5149
52- /// The receiver’ s delegate.
50+ /// The receiver' s delegate.
5351 public weak var delegate : ICTokenFieldDelegate ?
5452
5553 /// Characters that completes a new token, defaults are whitespace and commas.
@@ -117,7 +115,7 @@ public class ICTokenField: UIView, UITextFieldDelegate, ICBackspaceTextFieldDele
117115 }
118116 }
119117
120- /// Customized attributes for tokens in the normal state, e.g. NSFontAttributeName and NSForegroundColorAttributeName.
118+ /// Customized attributes for tokens in the normal state, e.g. ` NSFontAttributeName` and ` NSForegroundColorAttributeName` .
121119 public var normalTokenAttributes : [ String : NSObject ] ? {
122120 didSet {
123121 tokens. forEach { $0. normalTextAttributes = normalTokenAttributes ?? [ : ] }
@@ -211,11 +209,13 @@ public class ICTokenField: UIView, UITextFieldDelegate, ICBackspaceTextFieldDele
211209
212210 // MARK: - Initialization
213211
212+ /// Initializes and returns a newly allocated view object with the specified frame rectangle.
214213 public override init ( frame: CGRect ) {
215214 super. init ( frame: frame)
216215 setUpSubviews ( )
217216 }
218217
218+ /// Returns an object initialized from data in a given unarchiver.
219219 public required init ? ( coder aDecoder: NSCoder ) {
220220 super. init ( coder: aDecoder)
221221 setUpSubviews ( )
@@ -365,9 +365,7 @@ public class ICTokenField: UIView, UITextFieldDelegate, ICBackspaceTextFieldDele
365365
366366 // MARK: - Private Methods
367367
368- /**
369- Returns true if any highlighted token is found and removed, otherwise false.
370- */
368+ /// Returns true if any highlighted token is found and removed, otherwise false.
371369 private func removeHighlightedToken( ) -> Bool {
372370 for (index, token) in tokens. enumerate ( ) {
373371 if token. highlighted {
0 commit comments