PlaceHolder animates when start typing in TextField in iOS

前端 未结 6 1395
忘了有多久
忘了有多久 2021-01-31 05:22

How to set this type of animation in UITextField? Nowadays, Many apps are using this.

6条回答
  •  囚心锁ツ
    2021-01-31 05:39

    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.

    • JVFloatLabeledTextField
    • UIFloatLabelTextField
    • FloatLabelFields

    If you are looking for the UITextView equivalent of this animation, please visit UIFloatLabelTextView repository.

提交回复
热议问题