1
Je veux définir le type de clavier de l'UISearchBar à UIKeyboardAppearanceAlert, mais je n'arrive pas à accéder au UIKeyboard de l'UISearchBar.Comment changer le UIKeyboard en utilisant UISearchBar?
Je veux définir le type de clavier de l'UISearchBar à UIKeyboardAppearanceAlert, mais je n'arrive pas à accéder au UIKeyboard de l'UISearchBar.Comment changer le UIKeyboard en utilisant UISearchBar?
Vous devez accéder à l'intérieur UITextField
dans le UISearchBar
lui-même.
UITextField *textField = (UITextField *)[[searchBar subviews] objectAtIndex:0];
textField.keyboardAppearance = UIKeyboardAppearanceAlert;
Merci! La propriété correcte est keyboardAppearance à propos. –