標籤:
http://stackoverflow.com/questions/17678881/how-to-change-status-bar-text-color-in-ios-7
stackoverflow 上的一個回答
wilsontgh
或者,你也可以選擇基於狀態列的外觀退出view-controller
1. 設定UIViewControllerBasedStatusBarAppearance 為 NO.
2. 調用 [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
Lucas
其實不寫任何代碼就能實現。
按照下述步驟,讓整個APP中的狀態列文本顯示為白色:
在項目格式檔案中
- Status bar style: UIStatusBarStyleLightContent
- View controller-based status bar appearance: NO
- Status bar is initially hidden: NO
Pradeep Mahdevu
在 Info.plist 中設定‘View controller-based status bar appearance‘ 為 NO
在AppDelegate 中添加:
| 1 |
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent]; |
至
| 1234 |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{ ...... ...} |
stepik21
對我來說都沒用,下面是我的解決方案:
在Info.plist 添加
UIViewControllerBasedStatusBarAppearance, 設定值為 NO
然後再didFinishLaunchingWithOptions的AppDelegate, 添加這些代碼:
| 12 |
[application setStatusBarHidden:NO];[application setStatusBarStyle:UIStatusBarStyleLightContent]; |
ios 改變狀態列顏色