Change status bar text colour from white iOS 7 / Xcode 5 [duplicate]

泄露秘密 提交于 2019-12-17 19:37:20

问题


I'm developing an application for a school that I work at. Currently I am having issues with changing the status bar text from it's default state of black to white so we can actually read it!

I have tried everything i've found here and on the dev forums, including calling View controller-based status bar appearance = "NO" and also [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];


回答1:


I just fixed this issue in one of my apps. Implement this in your UIViewController:

- (UIStatusBarStyle)preferredStatusBarStyle
{
    return UIStatusBarStyleLightContent;
}

Or choose another UIStatusBarStyle value that you need.




回答2:


You can use this in your AppDelegate:

[UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleLightContent;



回答3:


Here is a solution for your problem: How to change Status Bar text color in iOS 7.



来源:https://stackoverflow.com/questions/18977160/change-status-bar-text-colour-from-white-ios-7-xcode-5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!