HLPlaceholder provides an easy-to-use placeholder mechanism for textfields with a nice and smooth animation.
If your project doesn't use ARC: you must add the -fobjc-arc
compiler flag to HLPlaceholder.m
in Target Settings > Build Phases > Compile Sources.
- Drag the
./HLPlaceholder
folder into your project.
If you feel easy with Git, create a submodule into your own project.
Drag-n-drop a classic UITextField and make it a subclass of HLPlaceholder.
Create an instance of HLPlaceholder as you would have done with a classic UITextField -- in fact, HLPlaceholder is a subclass of UITextField.
You can set the placeholder thumbnail color with the property placeholderColor
:
sampleTextField.placeholderColor = [UIColor orangeColor];
HLPlaceholder was developed by Hervé Heurtault de Lammerville. If you have any feature suggestion or bug report, please help out by creating an issue on GitHub. If you're using HLPlaceholder in your project, please let me know.