I have implemented a TTPickerTextField in my application,
I would like to limit the number of choice the user can do it.
Now, the TTPickerTextField has no limit. The user can select an unlimited number of fields.
Thank a lot.
Sahid
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.
TTPickerTextField is a subclass of UITextField, so you should be able to use its delegate methods to do what you want. You can do this by implementing the
textField:shouldChangeCharactersInRangedelegate method and returningNOwhen the maximum number of tokens are reached.Where you create and initialize the
TTPickerTextField, set the delegate method appropriately:Then your delegate object (probably the controller) can implement the delegate method to limit the number of tokens: