我在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