在 Xcode < 9.3 中,我们可以通过将顶部栏模拟指标设置为 None 来在 xib 中隐藏视图中的状态栏。 但是现在在 9.3 中,设置为 None 时,状态栏没有被隐藏。 有什么办法可以隐藏它吗?
在您的info.plist中添加以下两个属性以隐藏状态栏: View controller-based status bar appearance (Boolean: NO) Status bar is initially hidden (Boolean: YES) 来自源代码<key>UIStatusBarHidden</key> <true/> <key>UIViewControllerBasedStatusBarAppearance</key> <false/> 或者