Skip to content

Commit e68ffd3

Browse files
committed
Update descriptions of undocumented methods
1 parent 7347e26 commit e68ffd3

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

Source/KeyboardDismissTextField/ICKeyboardDismissAccessoryView.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,18 @@
2626

2727
import UIKit
2828

29+
/// A customized keyboard accessory view with a dismiss button.
2930
@IBDesignable
3031
public class ICKeyboardDismissAccessoryView: UIView {
3132

3233
/// The background color of the button to dismiss keyboard.
33-
@IBInspectable var buttonColor: UIColor = Constants.ButtonColor {
34+
@IBInspectable public var buttonColor: UIColor = Constants.ButtonColor {
3435
didSet {
3536
dismissButton.backgroundColor = buttonColor
3637
}
3738
}
3839

40+
/// The button to dismiss keyboard.
3941
public private(set) lazy var dismissButton: UIButton = {
4042
let _button = UIButton()
4143
let resources = NSBundle(forClass: self.dynamicType)
@@ -57,11 +59,13 @@ public class ICKeyboardDismissAccessoryView: UIView {
5759

5860
// MARK: - Initialization
5961

62+
/// Initializes and returns a newly allocated view object with the specified frame rectangle.
6063
public override init(frame: CGRect) {
6164
super.init(frame: frame)
6265
setUpSubviews()
6366
}
6467

68+
/// Returns an object initialized from data in a given unarchiver.
6569
public required init?(coder aDecoder: NSCoder) {
6670
super.init(coder: aDecoder)
6771
setUpSubviews()

Source/KeyboardDismissTextField/ICKeyboardDismissTextField.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@
2626

2727
import UIKit
2828

29+
/// A text field that has a button to dismiss keyboard on the input accessory view.
2930
@IBDesignable
3031
public class ICKeyboardDismissTextField: UITextField {
3132

33+
/// The custom input accessory view with a button to dismiss keyboard.
3234
@IBOutlet public var keyboardAccessoryView: ICKeyboardDismissAccessoryView! {
3335
didSet {
3436
if UI_USER_INTERFACE_IDIOM() != .Phone { return }
@@ -39,11 +41,13 @@ public class ICKeyboardDismissTextField: UITextField {
3941

4042
// MARK: - Initialization
4143

44+
/// Initializes and returns a newly allocated view object with the specified frame rectangle.
4245
public override init(frame: CGRect) {
4346
super.init(frame: frame)
4447
setUpAccessoryView()
4548
}
4649

50+
/// Returns an object initialized from data in a given unarchiver.
4751
public required init?(coder aDecoder: NSCoder) {
4852
super.init(coder: aDecoder)
4953
setUpAccessoryView()

Source/TokenField/ICTokenField.swift

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,13 @@ import UIKit
4141
}
4242

4343

44-
////////////////////////////////////////////////////////////////////////////////
45-
46-
44+
/// A text field that groups input texts with delimiters.
4745
@IBDesignable
4846
public class ICTokenField: UIView, UITextFieldDelegate, ICBackspaceTextFieldDelegate {
4947

5048
// MARK: - Public Properties
5149

52-
/// The receivers 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

Comments
 (0)