Commit 9f8578ff by Daniel Dahan

fixed TextField animation

parent c05511dc
......@@ -640,12 +640,16 @@ public class TextField : UITextField {
/// Hides and animates the titleLabel property.
private func hideTitleLabel() {
UIView.animateWithDuration(0.15, animations: { [unowned self] in
self.titleLabel.font = self.font
let h: CGFloat = ceil(titleLabel.font.lineHeight)
UIView.animateWithDuration(0.1, animations: { [unowned self] in
self.titleLabel.frame = self.bounds
}) { [unowned self] _ in
self.placeholder = self.placeholderText
self.titleLabel.hidden = true
UIView.animateWithDuration(0.15, animations: { [unowned self] in
self.titleLabel.font = self.font
}) { [unowned self] _ in
self.placeholder = self.placeholderText
self.titleLabel.hidden = true
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment