[UITextFieldVariable becomeFirstResponder]; is bringing the keyboard on to the screen.
How can I detect when a user types in a letter on the keyboard?
I’d like to know each time a key has been pressed.
Thanks so much in advance!
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.
Use the
NSNotificationCenterand take a look at theUITextFieldTextDidChangeNotification.Now implement a function
-(void)textFieldChanged;and each time this function gets called compare the new text in theUITextFieldwith the old text. Whatever has changed is the button that was pressed.Do something similar for
UITextFieldTextDidBeginEditingNotificationandUITextFieldTextDidEndEditingNotificationto ensure that buttons were pressed even though no text was typed (like pressing backslash).