iOS7.1键盘模糊

时间:2014-04-06 20:03:25

标签: ios

enter image description here我正在开发一款应用,我遇到了这个问题。如何在youtubes iphone / iPad应用程序中实现键盘背景模糊?我无法弄清楚。任何帮助都会很棒!

2 个答案:

答案 0 :(得分:2)

此效果作为iOS 7.1 SDK的一部分发生。将您的设备升级到iOS 7.1,将Xcode升级到5.1及更高版本,您就会看到它。

要获得较暗的键盘,您需要将文本字段或文本视图的keyboardAppearance属性设置为UIKeyboardAppearanceDark

答案 1 :(得分:2)

将键盘外观属性设置为UIKeyboardAppearanceDark

实施例

[textField setKeyboardAppearance:UIKeyboardAppearanceAlert];

来自文档

//
// 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
};