我在navigationitem的titleview中添加了一个搜索栏。搜索工作正常,但使用导航控制器时,搜索栏的背景改变颜色,看到下面搜索栏在导航栏中改变颜色
,我淡淡的色彩是通过Xcode的改变导航项目的颜色在故事板唯一的地方
为把搜索栏在titleview的
_searchController = [[UISearchController alloc] initWithSearchResultsController:nil];
[_searchController.searchBar sizeToFit];
self.navigationItem.titleView = _searchController.searchBar;
什么导致了这种着色相关的代码?
试图与
[_searchController.searchBar setBarTintColor:[UIColor clearColor]];
改变bartint颜色,但我得到的是不工作这
也事
[_searchController.searchBar setBarTintColor:self.navigationController.navigationBar.tintColor];
_searchController.searchBar.backgroundColor = self.navigationController.navigationBar.tintColor;
,并与backgroundColor
看来,这种颜色是某种方式以外的设置。看到这里有redColor
我试过clearColor,不工作 – 2015-03-02 11:34:38
如何让你的gif图像像上传的问题图像? – 2015-05-02 12:22:17
我使用LICEcap的操作系统x – 2015-05-02 18:26:18