2013-10-02 143 views
13

我使用UISearchBar作爲UITableView的標頭。 UISearchBar樣式是UISearchBarStyleMinimal。當搜索處於活動狀態時,狀態欄變爲黑色。如何解決這個問題?IOS7狀態欄在搜索處於活動狀態後變爲黑色

搜索之前是活動

Before search is active

搜索活躍

Search is active

+0

請通過此鏈接可能幫助你http://stackoverflow.com/que stions/17678881/how-to-change-status-bar-text-color-in-ios-7 –

+1

http://stackoverflow.com/questions/18929864/how-do-i-change-the-navigation-bar- color-in-ios-7/18929980#18929980 – Rajneesh071

+0

問題是我想將狀態欄設置爲默認樣式。 LightContent是好的,但我的應用程序中使用默認樣式的所有視圖控制器都是最好的 – 9891541

回答

21

你只需要做到這一點:

self.navigationController.view.backgroundColor = [UIColor lightGrayColor]; 
+3

這解決了我的問題,但問題是爲什麼我們需要這樣做?這似乎是蘋果方面的一個漏洞。 – Peter