Monotouch.Dialog - UISearchBar Tint [英] Monotouch.Dialog - UISearchBar Tint

查看:30
本文介绍了Monotouch.Dialog - UISearchBar Tint的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在 DialogViewController 上启用搜索栏时,搜索栏的色调如何改变?

When I enable the Search bar on a DialogViewController, how is the searchbar's tint changed?

        EnableSearch = true;
        SearchPlaceholder = "Find station";
        AutoHideSearch = false;

推荐答案

MonoTouch.Dialog 中的 searchbar 是私有的,您需要修改源代码以在实例化 searchBar 时更改 TintColor.

The searchbar in MonoTouch.Dialog is private, you would need to modify your source code to change the TintColor when the searchBar is instantiated.

评论中建议的另一个选项是使用:

Another option suggested in the comments is to use:

((UISearchBar) TableView.TableHeaderView).TintColor = UIColor.Black;

这篇关于Monotouch.Dialog - UISearchBar Tint的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆