如何在iOS中更改键盘背景颜色? [英] How to change keyboard background color in iOS?
本文介绍了如何在iOS中更改键盘背景颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道如何在iOS中以编程方式更改键盘背景颜色?
背景通常是灰色的,但我已经看到黑色背景(字母后面)。
I would like to know how to change the keyboard background color programmatically in iOS? The background is normally grey but I have already seen black background (behind letters).
推荐答案
对于黑暗的背景使用
mytextfield.keyboardAppearance = UIKeyboardAppearanceAlert;
阅读以查找有关 UITextInputTraits (在iOs 7 +上使用 UIKeyboardAppearanceDark
)。
Read to find more information about UITextInputTraits (use UIKeyboardAppearanceDark
at iOs 7+).
这篇关于如何在iOS中更改键盘背景颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文