从多任务恢复时,状态栏样式从浅色变为黑色

Status Bar Style changes from light to black when resuming from multitask

如果我双击主页按钮以调出我的 phone 上加载的所有应用程序,然后 select 我的应用程序,状态栏样式会先变黑一秒钟,然后再次切换为白色。

在您应用的 info.plist 文件中,确保添加此 Status bar stytleView controller-basedStatus bar appearance

我发现添加这个也有助于相关视图。

func navigationController(navigationController: UINavigationController, willShowViewController viewController: UIViewController, animated: Bool) {
        // for some reason, they thought it would be fun to switch the status bar color when this is presented, so we'll change it back.... -.-
    UIApplication.sharedApplication().statusBarStyle = .LightContent
}