How to change keyboard background color in iOS?

前端 未结 8 1697
一整个雨季
一整个雨季 2020-12-02 16:51

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 le

8条回答
  •  青春惊慌失措
    2020-12-02 17:36

    For the dark background use:

    mytextfield.keyboardAppearance = UIKeyboardAppearanceAlert;
    

    Read to find more information about UITextInputTraits (use UIKeyboardAppearanceDark at iOS 7+).

提交回复
热议问题