Skip to content

Commit cdf255e

Browse files
Merge branch 'support-programtical-views' into 'master'
Make IBInspectables public to support programatical views See merge request keepworks/KWVerificationCodeView!9
2 parents 3dd32f3 + 67aa1bb commit cdf255e

2 files changed

Lines changed: 11 additions & 10 deletions

File tree

KWVerificationCodeView.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 = 'KWVerificationCodeView'
3-
s.version = '0.1.3'
3+
s.version = '0.1.4'
44
s.summary = 'A verification code view with validation.'
55
s.description = 'A customisable verification code view with built in validation. Can be used for one time passwords (OTPs), email verification codes etc.'
66
s.homepage = 'https://github.com/keepworks/kwverificationcodeview'

KWVerificationCodeView/Classes/KWVerificationCodeView.swift

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,45 +21,45 @@ public protocol KWVerificationCodeViewDelegate: class {
2121
private let textFieldViewVerticalSpace: CGFloat = 6
2222

2323
// MARK: - IBInspectables
24-
@IBInspectable open var underlineColor: UIColor = UIColor.darkGray {
24+
@IBInspectable public var underlineColor: UIColor = UIColor.darkGray {
2525
didSet {
2626
for textFieldView in textFieldViews {
2727
textFieldView.underlineColor = underlineColor
2828
}
2929
}
3030
}
3131

32-
@IBInspectable var underlineSelectedColor: UIColor = UIColor.black {
32+
@IBInspectable public var underlineSelectedColor: UIColor = UIColor.black {
3333
didSet {
3434
for textFieldView in textFieldViews {
3535
textFieldView.underlineSelectedColor = underlineSelectedColor
3636
}
3737
}
3838
}
3939

40-
@IBInspectable var textColor: UIColor = UIColor.darkText {
40+
@IBInspectable public var textColor: UIColor = UIColor.darkText {
4141
didSet {
4242
for textFieldView in textFieldViews {
4343
textFieldView.numberTextField.textColor = textColor
4444
}
4545
}
4646
}
4747

48-
@IBInspectable var digits: UInt8 = 4 {
48+
@IBInspectable public var digits: UInt8 = 4 {
4949
didSet {
5050
updateNumberOfDigits()
5151
}
5252
}
5353

54-
@IBInspectable var textSize: CGFloat = 24.0 {
54+
@IBInspectable public var textSize: CGFloat = 24.0 {
5555
didSet {
5656
for textFieldView in textFieldViews {
5757
textFieldView.numberTextField.font = UIFont.systemFont(ofSize: textSize)
5858
}
5959
}
6060
}
6161

62-
@IBInspectable var textFont: String = "" {
62+
@IBInspectable public var textFont: String = "" {
6363
didSet {
6464
if let font = UIFont(name: textFont.trim(), size: textSize) {
6565
textFieldFont = font
@@ -73,30 +73,31 @@ public protocol KWVerificationCodeViewDelegate: class {
7373
}
7474
}
7575

76-
@IBInspectable var textFieldBackgroundColor: UIColor = UIColor.clear {
76+
@IBInspectable public var textFieldBackgroundColor: UIColor = UIColor.clear {
7777
didSet {
7878
for textFieldView in textFieldViews {
7979
textFieldView.numberTextField.backgroundColor = textFieldBackgroundColor
8080
}
8181
}
8282
}
8383

84-
@IBInspectable var textFieldTintColor: UIColor = UIColor.blue {
84+
@IBInspectable public var textFieldTintColor: UIColor = UIColor.blue {
8585
didSet {
8686
for textFieldView in textFieldViews {
8787
textFieldView.numberTextField.tintColor = textFieldTintColor
8888
}
8989
}
9090
}
9191

92-
@IBInspectable var darkKeyboard: Bool = false {
92+
@IBInspectable public var darkKeyboard: Bool = false {
9393
didSet {
9494
keyboardAppearance = darkKeyboard ? .dark : .light
9595
for textFieldView in textFieldViews {
9696
textFieldView.numberTextField.keyboardAppearance = keyboardAppearance
9797
}
9898
}
9999
}
100+
100101
// MARK: - IBOutlets
101102
@IBOutlet var view: UIView!
102103

0 commit comments

Comments
 (0)