How to disable a button after entering a particular letter in a textfield?
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.
Bind the text field’s value to one of your object’s properties and ensure to check the “updates continuously” box in Interface Builder. For this example, the property will be called
theText. Then, bind the enabled state of the button using a key-value path of saycontainsLetterA, then in your object put the methodThen, also in your object, add the class method: