TextFieldFloatingPlaceholder
Demo
How to
- Add uitextfield to storyboard.
- Inherit from TextFieldFloatingPlaceholder.
- Optionally set the following properties.
| property | effect |
|---|---|
floatingPlaceholderMinFontSize |
Font size when raised |
floatintPlaceholderDuration |
Animation Duration |
floatingPlaceholderColor |
Font Color |
validationFalseLineEditingColor |
Underline color under editing and validation NG |
validationTrueLineEditingColor |
Underline color under editing and validation OK |
validationFalseLineColor |
Underline color under not editing and validation NG |
validationTrueLineColor |
Underline color under not editing and validation OK |
validation |
Varidation closure |
Example
To run the example project, clone the repo, and run pod install from the Example directory first.
Requirements
- iOS 9.0 or later
- Xcode 9.x
- Swift 4.x
Installation
TextFieldFloatingPlaceholder supports installation via the package managers Carthage and CocoaPods.
Carthage
- Add
github "taiking/TextFieldFloatingPlaceholder"to your Cartfile. - Run
carthage update.
CocoaPods
Add the followings to your Podfile:
use_frameworks!
pod "TextFieldFloatingPlaceholder"Run pod install.
License
TextFieldFloatingPlaceholder is available under the MIT license. See the LICENSE file for more info.
