问题描述
- UIAlertView修改键盘颜色
-
用到LoginAndPasswordInput的UIAlertView[message setAlertViewStyle:UIAlertViewStyleLoginAndPasswordInput];
alertview 的颜色是标准的蓝色,但是弹出的键盘颜色是黑色,我想修改,怎么改?
解决方案
使用UITextfield 的keyboardAppearance 属性来设置
typedef NS_ENUM(NSInteger, UIKeyboardAppearance) {
UIKeyboardAppearanceDefault, // Default apperance for the current input method.
UIKeyboardAppearanceAlert // Appearance suitable for use in "alert" scenarios.
};
textfield.keyboardAppearance = UIKeyboardAppearanceDefault;
时间: 2024-10-01 21:59:59