views:

228

answers:

1

I have a UITableViewController which implements UISearchDisplayDelegate and UISearchBarDelegate

when I load i would like the text entry to be active and the keyboard displayed so the user can begin typing immediately.

I tried

[self.searchDisplayController setActive:YES];

in the viewDidLoad method.

The field becomes active and the cancel button is displayed but the keyboard does not appear.

+2  A: 

You can send becomeFirstResponder to the search bar or the search bar delegate to bring up the keyboard.

Nathan de Vries
thanks - it needs to go in the viewDidAppear:animated method Eg [self.searchDisplayController.searchBar becomeFirstResponder];
joneswah