UIStatusBarStyle PreferredStatusBarStyle does not work

来源:互联网 发布:广州525孕妇摄影淘宝网 编辑:程序博客网 时间:2024/04/30 08:50



down vote

I discovered that if your ViewController is inside a navigationController then the navigationController’s navigationBar.barStyle determines the statusBarStyle.

Setting your navigationBar’s barStyle to UIBarStyleBlackTranslucent will give white status bar text (ie. UIStatusBarStyleLightContent), and UIBarStyleDefault will give black status bar text (ie. UIStatusBarStyleDefault).

Note that this applies even if you totally change the navigationBar’s color via its barTintColor.


0 0
原创粉丝点击