Extension of UITextField
to set the MAX/LIMIT LENGTH to your text field.
Use CocoaPods.
pod 'UITextField+Max'
Create UITextField
, then set maxLength
.
UITextField *textField = [[UITextField alloc] init];
textField.maxLength = 10;
It's really simple, right?
There is a simple DEMO PROJECT using UITextField+Max
in Demo directory.
UITextField+Max is under WTFPL. You can do what the fuck you want with this shit. See LICENSE file for more info.