/// 只能输入字母和数字
[_textField lfy_makeStrategy:^(LFYStrategyMaker *make) {
make.lfy_limit(15).lfy_option(LFYStrategyOptionNumber | LFYStrategyOptionCharacter);
}];
/// 不能输入空格
[_textView lfy_makeStrategy:^(LFYStrategyMaker *make) {
make.lfy_limit(10).lfy_option(LFYStrategyOptionWhitespace).lfy_inverted();
}];
iOS 8.0
LFYTextInputFilter is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'LFYTextInputFilter'
LFYTextInputFilter is available under the MIT license. See the LICENSE file for more info.