Skip to content

Commit 8024b7e

Browse files
committed
1.0.4
1 parent ea2bfeb commit 8024b7e

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

ValidationTextField.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Pod::Spec.new do |s|
1010
s.name = 'ValidationTextField'
11-
s.version = '1.0.3'
11+
s.version = '1.0.4'
1212
s.summary = 'This TextField for Validation ( complete or error )'
1313

1414
# This description is used to generate tags and improve search results.

ValidationTextField/Classes/ValidationTextField.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ open class ValidationTextField: UITextField {
6363
createTitleLabel()
6464
}
6565
}
66-
@IBInspectable
66+
@IBInspectable
6767
open var titleColor: UIColor = UIColor(red:0.49, green:0.49, blue:0.49, alpha:1.0) {
6868
didSet{
6969
update()
@@ -136,6 +136,8 @@ open class ValidationTextField: UITextField {
136136

137137
open var errorImage: UIImage?
138138

139+
open lazy var statusImageView = UIImageView()
140+
139141
private lazy var titleLabel = UILabel()
140142

141143
private lazy var errorLabel = UILabel()
@@ -144,8 +146,6 @@ open class ValidationTextField: UITextField {
144146

145147
private lazy var containerView = UIStackView()
146148

147-
private lazy var statusImageView = UIImageView()
148-
149149
private var validateStatus: ValidateType = .ready {
150150
didSet {
151151
switch validateStatus {
@@ -252,7 +252,7 @@ open class ValidationTextField: UITextField {
252252
lineView.isUserInteractionEnabled = false
253253
lineView.backgroundColor = titleColor
254254
configureDefaultLineHeight()
255-
255+
256256
lineView.autoresizingMask = [.flexibleWidth, .flexibleTopMargin]
257257
addSubview(lineView)
258258
}
@@ -377,13 +377,13 @@ open class ValidationTextField: UITextField {
377377
options: animationOptions,
378378
animations: { () -> Void in
379379
updateBlock()
380-
},
380+
},
381381
completion: nil)
382382
}
383383
}
384384

385385
private func update(){
386-
if !isValid && isEditing && text != "" {
386+
if !isValid && text != "" {
387387
errorLabel.text = errorMessage
388388
errorLabel.textColor = errorColor
389389
errorLabel.font = errorFont

0 commit comments

Comments
 (0)