views:

10

answers:

0

If I want a text field in my view to be focused for text entry immediately after the view appears on screen, is it correct to simply instruct the UITextField to "becomeFirstResponder" in a UIViewController's viewDidAppear.

Eg:

-(void) viewDidAppear:(BOOL)animated
{
   [super viewDidAppear:animated];
   [myTextField becomeFirstResponder];
}

While this seems elegant enough, are their any better alternatives?