Popping up the keyboard on the iPlatform

If you want the virtual keyboard to popup when you display a text field in a view do the following:

In your viewDidLoad or if you call any method to do “things” before displaying then the variable that points to the text field should have the becomeFirstResponder message sent to it.
Example:
In the .h of your viewcontroller or class
UITextField *tfJoroto;

In the .m of your viewcontroller or class
-(void)viewDidLoad {
[tfJoroto becomeFirstResponder];
} // viewDidLoad

This should also set the focus to the UITextField.

Good hunting.
-T-

Share
This entry was posted in iPod and Apple Platform and tagged , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>