In your Info.plist you need to define View controller-based status bar appearance to any value.
enter image description here
If you define it YES then you should override preferredStatusBarStyle function in each view controller.
If you define it NO then you can set style in AppDelegate using
NSLog("设置顶部状态栏的状态")
UIApplication.sharedApplication().setStatusBarStyle(UIStatusBarStyle.LightContent, animated: false)
本文介绍了如何在iOS应用中设置状态栏的样式。通过在Info.plist文件中定义View controller-based status bar appearance,并根据不同配置选择在AppDelegate或每个ViewController中进行样式设置。

206

被折叠的 条评论
为什么被折叠?



