Static keyboard in uitableview

Posted by Martin on Stack Overflow See other posts from Stack Overflow or by Martin
Published on 2010-06-02T12:24:43Z Indexed on 2010/06/02 15:43 UTC
Read the original article Hit count: 130

Filed under:
|
|

I have a UITableView that holds just two cells with a textfield in each. As my tableview is just for editing the text in these textfields I always want the keyboard to be shown static in the bottom of the screen. So in viewDidLoad I set the first textfield to become first responder.

Something I have noticed though is that when I push the UITableViewController into the UINavigationController the keyboard show up a little bit slower so you can see it animate into the screen. It would be much better if it was there already there when the uitableview shows up.

I also tried making the textfield first responder before pushing it as recommended but that didn't made the keyboard show at all:

MyTableViewController *myTableViewController = [[MyTableViewController alloc] initWithNibName:@"MyTableViewController" bundle:nil];
[myTableViewController.textField becomeFirstResponder];
[self.navigationController pushViewController:myTableViewController animated:YES];
[myTableViewController release];

How can I accomplish this?

Thanks!

© Stack Overflow or respective owner

Related posts about iphone

Related posts about uitableview