2013-10-04 16 views
0

我將如何改變搜索欄感應鍵盤上的文字從「搜索」變爲「取消」或「完成」MonoTouch的對話框搜索鍵盤定製

我可以改變鍵盤類型:

((UISearchBar)TableView.TableHeaderView).KeyboardType = UIKeyboardType.CHOICE 

回答

0

爲了得到ReturnKeyType -

foreach (UIView subView in ((UISearchBar)TableView.TableHeaderView).Subviews) 
{ 
    var view = subView as IUITextInputTraits; 
    if (view != null) 
    { 
     view.KeyboardAppearance = UIKeyboardAppearance.Default; 
     view.ReturnKeyType = UIReturnKeyType.Done; 
    } 
} 

這個工作適合我的用例。