我为我的应用程序制作了一个黑暗主题,其中所有背景都是黑色,文本和控件都是橙色 . 我还希望状态栏对应于此主题,但 .lightContent 选项,专为深色背景设计,返回白色文本颜色 . 我想知道是否有可能使状态栏文本不是黑色或白色(橙色,在我的情况下)?
.lightContent
由于苹果仅提供两种颜色来显示状态栏文本(白色和黑色),因此无法更改状态栏的文本颜色 .
要显示白色文本,请将以下内容添加到项目Info.plist中
View controller-based status bar appearance = false Status bar style = Transparent black style (alpha of 0.5)
要显示黑色文本,请将以下内容添加到项目Info.plist中
View controller-based status bar appearance = false Status bar style = Gray style (default) OR Opaque black style
1 回答
由于苹果仅提供两种颜色来显示状态栏文本(白色和黑色),因此无法更改状态栏的文本颜色 .
要显示白色文本,请将以下内容添加到项目Info.plist中
要显示黑色文本,请将以下内容添加到项目Info.plist中