I am working on iphone application in which i have to return the keyboard when i edit my textfield or delete the text in textfield also my textfield should allow only one character in textfield.
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Implement
UITextFieldDelegateprotocol and implement the following methodYou can get the length of the text in the textfield. If it is greater than 1, then, resign the first responder.
You can do something like this, considering
_textFieldas your textfield object.