开发者社区 问答 正文

关于UIAlertView修改键盘颜色 的问题

用到LoginAndPasswordInputUIAlertView

[message setAlertViewStyle:UIAlertViewStyleLoginAndPasswordInput];

alertview 的颜色是标准的蓝色,但是弹出的键盘颜色是黑色,我想修改,怎么改?

展开
收起
爵霸 2016-03-19 10:59:32 1773 分享 版权
1 条回答
写回答
取消 提交回答
  • 使用UITextfieldkeyboardAppearance 属性来设置

    typedef NS_ENUM(NSInteger, UIKeyboardAppearance) {
        UIKeyboardAppearanceDefault, // Default apperance for the current input method.
        UIKeyboardAppearanceAlert  // Appearance suitable for use in "alert" scenarios.
    };
    
    
    textfield.keyboardAppearance = UIKeyboardAppearanceDefault;
    2019-07-17 19:07:41
    赞同 展开评论
问答地址: