How can I programmatically assign focus to a specific UITextField in a view? I have several fields and on view display, I'd like to put the cursor on a specific field, not the first one at top.
+11
A:
Try doing this in viewWillAppear:
[desiredField becomeFirstResponder];
By making the field the first responder, it have focus and the keyboard will be displayed.
Alexi Groove
2009-06-18 20:26:07
A:
Set the first responder for your view to be the text field. This can be done in IB.
Dan Lorenc
2009-06-18 20:26:11
where in IB can do you this?
Robin Jamieson
2009-06-18 20:27:10
http://www.mactech.com/articles/mactech/Vol.19/19.10/InterfaceBuilder/index.html
Dan Lorenc
2009-06-18 20:27:55