Alec
Alec

Reputation: 483

How to make the UIKeyboard black?

I've seen this SO question here: Can I tint (black) a UIKeyboard? If so, how?, where the top answer suggests that you can hack around but doing so may get your app rejected by Apple. This must not be true, as I've seen other iPhone applications (a major one being Clear) that have a black UIKeyboard. How is it done?

Here's a screenshot of Clear for reference:

enter image description here

Upvotes: 4

Views: 2290

Answers (3)

esilver
esilver

Reputation: 28463

Starting in iOS 7, you can use UIKeyboardAppearanceDark

So, for example:

self.textField.keyboardAppearance = UIKeyboardAppearanceDark

Upvotes: 3

calimarkus
calimarkus

Reputation: 9977

Isnt this the [textView setKeyboardAppearance:UIKeyboardAppearanceAlert]; style? Otherwise, as stated. It's not possible without hacking the subviews. Of course you can still setup your own complete inputView.

Upvotes: 4

Mick MacCallum
Mick MacCallum

Reputation: 130193

Try this out

   [(UITextField *)mySubView setKeyboardAppearance:UIKeyboardAppearanceAlert];

or just adding setKeyboardAppearance:UIKeyboardAppearanceAlert appropriately depending on how you have this set up!

Upvotes: 11

Related Questions