I have a scanner that is reading text into a UITextField, looks like it is one character at a time. So every 1/2 second or so I want to check the value of that UITextField so I can grab the value.
Share
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.
Two options:
1) Set the text field’s delegate, then catch the changes as they happen in the shouldChangeCharactersInRange method of said delegate.
2) Use an NSTimer object.
In most situations, the first method is superior, but if you want to check every so often rather than catching the changes as they happen, you will need the NSTimer.