自定义UITextFields效果:MMTextFieldEffects

jopen 9年前

TextFieldEffects扩展拥有自定义UITextFields效果,受Codrops启发,使用Objective-C构建。
</div>

Currently it features the following effects from the article:

  • Ichiro
  • Juro
  • Kuro
  • Minoru
  • Nariko
  • Yoshika
  • Nao

Credits

Improvement

  • Nao is still in testing phase,trying to crack the animation, Feel Free to crack and share the code

Screenshots

Ichiro

MMTextFieldEffects

Juro

MMTextFieldEffects

Kuro

MMTextFieldEffects

Minoru

MMTextFieldEffects

Nariko

MMTextFieldEffects

Yoshiko

MMTextFieldEffects

Nao

MMTextFieldEffects

How to Use

Just subclass your TextField to respective class.

MMTextFieldEffects

Note

  • Default TextField Height Used Here is80Feel Free To Customise and Play with Properties According to your Requirements, Following are properties used for specific purpose
  • borderTextFieldFor Outer Frame Used in Ichiro , Juro , Minoru , Nariko and Yoshiko
  • contentTextfieldFor Inner Frame Used in Ichiro and Nariko
  • leftLayerFor Outer Layer Used In Kuro and Nao
  • rightLayerFor Outer Layer Used In Kuro
  • placeHolderLabelPlace Holder Text Used in All
  • textRectForBoundsMethod to move the cursor of textfield

项目主页:http://www.open-open.com/lib/view/home/1441094155050