I have a textfield, which can have at most only one character. When the focus is on the textfield,
(1) if the character count is more than 1, then the textfield shouldn’t enable editing.
(2) But we should be able to delete that one character and replace it with another.
Right now I cant find a way to make both my conditions work. If I disable editing, the delete feature doesn’t work. If I enable it, the textfield length condition is not satisfied.
You need to validate the change in text field delegate’s
textField:shouldChangeCharactersInRange:replacementString:method: