I am doing a login page, whereby if the user press the login button without filling up the username/password, an alertview will pop up. How do I focus on the textfield and bring up the keyboard accordingly after the user dismiss the alertview?
What is the method to call to set focus on a particular UITextField? Thanks!
Make sure your UIAlertView’s delegate is your view controller (self), and in the implementation of the UIAlertView delegate method
alertView:clickedButtonAtIndex:, call[usernameTextField becomeFirstResponder]. Easy! (Make sure your view controller class adopts theUIAlertViewDelegateprotocol.)