I have a text field in my UI that when it’s selected presents a UIDatePicker instead of the default keyboard, how could I set up a button as to dismiss the picker when the user is done?
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.
What I do is have my inputView as a custom view which contains a
UIDatePickerand a toolbar above it with a ‘Done’ button wired up to a method that calls a delegate method to tell the object that owns theUITextFieldto dismiss the “keyboard” by callingresignFirstResponder.