Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the background color of keypad in iOS 7

I am using Xcode 5 for developing applications. I want to change the color of keyboard in iOS 7. I want a color like black or blue.

How can I change the color of keyboard in iOS 7?

like image 271
Anuj Kumar Rai Avatar asked Sep 19 '13 12:09

Anuj Kumar Rai


People also ask

How do you change keyboard color on IOS?

Open the Settings app on your iPhone or iPad. Scroll down and tap Display & Brightness. Tap Dark under the Appearance section at the top.


Video Answer


1 Answers

You can only set the keyboard appearance to any of three listed below using the UIKeyboardAppearance.

UIKeyboardAppearanceDefault  // Corresponds to the UIKeyboardAppearanceLight
UIKeyboardAppearanceDark     // Available in iOS 7.0 and later.
UIKeyboardAppearanceLight    // Available in iOS 7.0 and later.

There is one more constant named UIKeyboardAppearanceAlert but, that is now deprecated. You should use UIKeyboardAppearanceDark instead.

You can't use any custom or undefined color. So, Use ...

myTextfield.keyboardAppearance = UIKeyboardAppearanceDark;
like image 76
Bhavin Avatar answered Oct 19 '22 23:10

Bhavin