我目前正在尝试全局设置键盘样式,但我的方法不起作用。
我尝试使用UIAppearance
并将这行代码放在AppDelegate中:
[[UITextField appearance] setKeyboardAppearance:UIKeyboardAppearanceAlert];
但我在控制台上得到的是以下内容:
[UISearchBarTextField _UIAppearance_setKeyboardAppearance:]: unrecognized selector sent to instance 0xa1897e0
有什么解决方法吗?
textView.keyboardAppearance = UIKeyboardAppearanceDark;
- yuhua