- change font and color of placeholder
- limit textField input
- shake animation
- zoom in/out focus animation
- character range validation
- Hoshi Effect with above feature
- closure callback of character change in textField
- closure callback of textFieldDidBeginEditing
- closure callback of textFieldDidEndEditing
- all other default features of UITextField!!!
The Example app is cluttered to show how it performs in different/critical view hierarchy and situations. For better experience run the Example app.
To run the example project, clone the repo, and run pod install
from the Example directory first.
import TextFieldWrapper
yourTextField.zoomScale = 1.4 // some value > 1 for zoomIn effect.
yourTextField.addBlurToView = self.view // In which view you want to add transparent blur effect.
yourTextField.maxCharacter = 15
yourTextField.characterChangedEvent = { [weak self] (str, num) in
// your implementation
}
yourTextField.maxCharacter = 15
yourTextField.shouldTrim = false
yourTextField.characterChangedEvent = { [weak self] (str, num) in
// your implementation
}
let flag = yourTextField.isValid
yourTextField.shake()
yourTextField.shake(borderColor: .red, borderWidth: 2.0)
yourTextField.shake(borderColor: .red, borderWidth: 4, completion: {
[weak self] in
//your implementation
})
run the Example project, you will have a clean idea.
iOS 9
Swift 3
Xcode 8
TextFieldWrapper is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "TextFieldWrapper"
Just drag and drop the TextFieldWrapper folder to your project.
S.M.Moinuddin, shuvn.eee@gmail.com
TextFieldWrapper is available under the MIT license. See the LICENSE file for more info.