问题描述
我通过将UIStatusBarStyleOpaqueBlack / UIStatusBarStyle添加到Info.plist文件,为我的iPhone应用程序提供了黑色状态栏。它大部分时间都很好用。黑色状态栏显示应用程序何时运行以及何时显示Default.png。
I gave my iPhone app a black status bar by adding the UIStatusBarStyleOpaqueBlack / UIStatusBarStyle to the Info.plist file. It works great most of the time. The black status bar shows when the app is running and when the Default.png is being shown.
问题是当我通过按主页按钮退出应用程序时,状态栏变为白色块,而iPhone的标准退出动画正在进行。我没有在使用黑色状态栏的任何其他应用中看到此问题。
The issue is when I quit the app by pressing the home button, the status bar becomes a white block while the iPhone's standard quit animation is taking place. I haven't seen this issue with any other apps that use a black status bar.
我错过了什么?
推荐答案
将窗口的背景颜色设置为黑色。
Set the background color of your window to black.
[self.view.window setBackgroundColor:[UIColor blackColor]];
这篇关于退出iPhone应用程序时,黑色状态栏变为白色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!