当我在 a 上启用搜索栏时,搜索栏DialogViewController
的色调是如何改变的?
EnableSearch = true;
SearchPlaceholder = "Find station";
AutoHideSearch = false;
当我在 a 上启用搜索栏时,搜索栏DialogViewController
的色调是如何改变的?
EnableSearch = true;
SearchPlaceholder = "Find station";
AutoHideSearch = false;
MonoTouch.Dialog 中的搜索栏是私有的,您需要修改源代码以在实例化 searchBar 时更改 TintColor。
评论中建议的另一个选项是使用:
((UISearchBar) TableView.TableHeaderView).TintColor = UIColor.Black;
在 Miguel 的帮助下,我发现了TableHeaderView
容器,SearchBar
所以我可以在实例化tint
后更改容器(谢谢):searchBar
UISearchBar sb = TableView.TableHeaderView as UISearchBar;
if(sb!=null)
sb.TintColor = UIColor.Black;