Merge pull request #5 from TouchInstinct/bugfix/colorChangeUIUpdate

colors fixed
This commit is contained in:
Grigory 2017-01-26 16:01:24 +03:00 committed by GitHub
commit 40ad393cbe
1 changed files with 11 additions and 3 deletions

View File

@ -97,8 +97,16 @@ open class UIAnimatedTextField: UIView {
}
}
@IBInspectable public var placeholderTopColor: UIColor = UIColor.gray
@IBInspectable public var placeholderBottomColor: UIColor = UIColor.gray
@IBInspectable public var placeholderTopColor: UIColor = UIColor.gray {
didSet {
setState(toState: state)
}
}
@IBInspectable public var placeholderBottomColor: UIColor = UIColor.gray {
didSet {
setState(toState: state)
}
}
@IBInspectable public var enteredTextColor: UIColor {
get { return textField.textColor ?? UIColor.black }
@ -324,7 +332,7 @@ open class UIAnimatedTextField: UIView {
// MARK: - Animation
public func setState(toState state: AnimatedTextFieldState, duration: TimeInterval) {
public func setState(toState state: AnimatedTextFieldState, duration: TimeInterval = 0) {
UIView.animate(
withDuration: duration,
delay: 0,