Static keyboard in uitableview
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];
开发者_C百科How can I accomplish this?
Thanks!
take the textfield as public(set its property and synthesis) and from the place you are pushing it before that push set the first textfields to become first responder... and then push to the controller...
There can be much more options but this is the one i can suggest... may be it help...
Happy Coding....
精彩评论