Hi.. Can we define limit of inout in text field i wan that after certain number of character the keyboard should get hide. i should code on which event of textfields or keyboard.
+1
A:
What you can do is catch an event 'Editing Changed' on the text field in IB and get it to call an IBAction in your controller e.g. verifyInputLimit
.
In this method you call resignFirstResponder
when the size you require is reached
if ([myLimitedTextField.text length]>=MY_LIMIT {
[myLimitedTextField.text resignFirstResponder];
}
The user would still be able to 'paste' some text into this field which is greater than your limit. If you don't want this then you can truncate it in the same method
Liam
2010-05-05 09:18:40