iOS 全面禁止黑暗模式和系统黑暗模式下顶部时间可以正常显示

在info中设置

UIUserInterfaceStyle
Light

关闭某个界面黑暗模式

.light
.dark
.unspecified

viewController.overrideUserInterfaceStyle =

app在系统黑暗模式下可以正常显示了。但是仔细看会发现状态栏无法显示!
在项目的target对应的info.plist中添加以下设置:

UIViewControllerBasedStatusBarAppearance

你可能感兴趣的:(iOS 全面禁止黑暗模式和系统黑暗模式下顶部时间可以正常显示)