I am currently trying to set the keyboard style globally, but my approach does not work.
I tried it using UIAppearance
and put this line of code inside the AppDelegate :
[[UITextField appearance] setKeyboardAppearance:UIKeyboardAppearanceAlert];
But what I got on the console is the following:
[UISearchBarTextField _UIAppearance_setKeyboardAppearance:]: unrecognized selector sent to instance 0xa1897e0
Any ideas how to solve this?
iOS7 extended the UIAppearance
protocol for UITextFields, ergo you can set now the keyboardAppearance on UITextField.
[UITextField appearance].keyboardAppearance = UIKeyboardAppearanceDark;
However, UITextView
doesn't support it. For this class, I would go with jszumski's solution
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With