I\'m making a UITextField
that has a UIPickerView
as inputView
. Its all good, except that I can edit by copy, paste, cut and select te
Using the textfield delegate, there's a method
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
Return NO from this, and any attempt by the user to edit the text will be rejected.
That way you can leave the field enabled but still prevent people pasting text into it.