I have some handy UIIFs that bring the numberpad.
The user has input to I want to restrict control. For example, a special textfield should not be allowed more than 32 values.
What parameters do I need to enable & lt; Can I use 32?
Thanks
I will implement this UITextFieldDelegate method:
< Pre> - (BOOL) textField: (UITextField *) textField shouldChangeCharactersInRange: (NSRange) Category Replacement String: (NSString *) string {NSString * result = [textField.text stringByReplacingCharactersInRange: string with border: string]; If ([result intValue] <0] [result intValue]> 32) do not return; Yes come back } For stability, you may also want to implement -textfieldShouldEndEditing: When the value is invalid, return to the wrong.
Comments
Post a Comment