I want to set the keyboard type of the UISearchBar to UIKeyboardAppearanceAlert, but I can't seem to access the UIKeyboard of the UISearchBar.
A:
You need to access the inner UITextView
in the UISearchBar
itself.
UITextField *textField = (UITextField *)[[searchBar subviews] objectAtIndex:0];
textField.keyboardAppearance = UIKeyboardAppearanceAlert;
Jacob Relkin
2010-06-14 06:01:44
Thank you!The correct property is keyboardAppearance by the way.
Michael Yang
2010-06-15 17:58:54