在iOS中开始在TextField中键入内容时,PlaceHolder会设置动画 [英] PlaceHolder animates when start typing in TextField in iOS

查看:453
本文介绍了在iOS中开始在TextField中键入内容时,PlaceHolder会设置动画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆