TJLInputText
示例
要运行示例项目,请先克隆仓库,然后在 Example 目录中运行 pod install
。
要求
### 设置方法 @property (weak, nonatomic) IBOutlet CunstomTextFiled *letterInput; @property (weak, nonatomic) IBOutlet CunstomTextFiled *numberInput;
调用方法
self.letterInput.delegate = self; self.numberInput.delegate = self; self.letterInput.inputValidate = [LatterTextFieldValidate new]; self.numberInput.inputValidate = [NumberTextFieldValidate new];
- (void)textFieldDidEndEditing:(UITextField *)textField {
if ([textField isKindOfClass:[CunstomTextFiled class]]) {
[(CunstomTextFiled *)textField validate]; } }
需要什么 规则 只需要创建一个类 ,继承自 InputTextFileldValidate,然后编写约束。
安装
TJLInputText 通过 CocoaPods 提供。要安装,请将以下行添加到您的 Podfile 中
pod 'TJLInputText'
作者
tang335976123, [email protected]
许可
TJLInputText 在 MIT 许可下提供。有关更多信息,请参阅 LICENSE 文件。