eric2872
eric2872

Reputation: 122

iOS7.1 keyboard blur

enter image description hereI was developing an app and I ran into this issue. How would I achieve a keyboard background blur like the one in youtubes iphone/iPad app? I can't figure it out. Any help would be awesome!

Upvotes: 2

Views: 1100

Answers (2)

Léo Natan
Léo Natan

Reputation: 57060

This effect happens as part of the iOS 7.1 SDK. Upgrade your devices to iOS 7.1 and your Xcode to 5.1 and above, and you will see it.

To get the darker keyboard, you need to set the keyboardAppearance property of the text field or text view to UIKeyboardAppearanceDark.

Upvotes: 2

WrightsCS
WrightsCS

Reputation: 50727

Set the Keyboard appearance property to UIKeyboardAppearanceDark.

Example

[textField setKeyboardAppearance:UIKeyboardAppearanceAlert];

From the documentation

//
// UIKeyboardAppearance
//
typedef NS_ENUM(NSInteger, UIKeyboardAppearance) {
    UIKeyboardAppearanceDefault,          // Default apperance for the current input method.
    UIKeyboardAppearanceDark NS_ENUM_AVAILABLE_IOS(7_0),
    UIKeyboardAppearanceLight NS_ENUM_AVAILABLE_IOS(7_0),
    UIKeyboardAppearanceAlert = UIKeyboardAppearanceDark,  // Deprecated
};

Upvotes: 2

Related Questions