UISearchbar键盘颜色iphone monotouch

时间:2013-04-15 13:24:54

标签: iphone ios objective-c xamarin.ios uikeyboard

如何将UISeachBar键盘颜色更改为黑色?

2 个答案:

答案 0 :(得分:0)

简答您无法更改KeyBoard的颜色因为Apple / iPhone不提供任何此类功能。

但您可以更改键盘的外观,请阅读This official Document.

答案 1 :(得分:0)

尝试将文本字段的keyboardAppearance属性设置为UIKeyboardAppearanceAlert。这会产生黑色背景

for(UIView *subView in searchBar.subviews)
    if([subView isKindOfClass: [UITextField class]])
        [(UITextField *)subView setKeyboardAppearance: UIKeyboardAppearanceAlert];