测试已测试 | ✗ |
语言语言 | SwiftSwift |
许可协议 | MIT |
发布最后发布 | 2017年8月 |
SwiftSwift 版本 | 3.0 |
SPM支持 SPM | ✗ |
由 S.M.Moinuddin 维护。
- 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!!!
要运行示例项目,首先克隆存储库,并从 Example 目录运行 pod install
。
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
})
运行示例项目,您将有一个清晰的思路。
iOS 9
Swift 3
Xcode 8
TextFieldWrapper 通过 CocoaPods 提供。要安装它,只需在 Podfile 中添加以下行:
pod "TextFieldWrapper"
S.M.Moinuddin, [email protected]
TextFieldWrapper 在 MIT 许可协议下可用。有关更多信息,请参阅 LICENSE 文件。