在iOS中开始在TextField中键入内容时,PlaceHolder会设置动画 [英] PlaceHolder animates when start typing in TextField in iOS
问题描述
如何在UITextField
中设置这种类型的动画?如今,许多应用程序都在使用它.
我已经找到了解决方案.您可以使用多个标签来管理此类动画,并将这些标签显示隐藏到textFieldDidBeginEditing
方法中.
如果您希望获得与问题描述相同的精美动画,请尝试在第三方存储库中尝试UITextField
.
如果您正在寻找与此动画等效的UITextView
,请访问 UIFloatLabelTextView 存储库. /p>
How to set this type of animation in UITextField
? Nowadays, Many apps are using this.
I've found the solution. You can manage this type of animation using multiple labels, and show-hide those labels into textFieldDidBeginEditing
method.
If you want nice animation same as you describe into your question, then try once following third party repository for UITextField
.
If you are looking for the UITextView
equivalent of this animation, please visit UIFloatLabelTextView repository.
这篇关于在iOS中开始在TextField中键入内容时,PlaceHolder会设置动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!