How would I change the text on the search bar induced keyboard from "search" to "cancel" or "done"
I can change the keyboard type:
((UISearchBar)TableView.TableHeaderView).KeyboardType = UIKeyboardType.CHOICE
How would I change the text on the search bar induced keyboard from "search" to "cancel" or "done"
I can change the keyboard type:
((UISearchBar)TableView.TableHeaderView).KeyboardType = UIKeyboardType.CHOICE
为了获得 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;
}
}
这适用于我的用例。