【问题标题】:how to change the color of iPhone status bar? [duplicate]如何更改 iPhone 状态栏的颜色? [复制]
【发布时间】:2013-11-28 13:11:33
【问题描述】:

用Xcode开发IOS时如何改变iPhone状态栏的颜色?

【问题讨论】:

  • Google > ios 7 状态栏颜色
  • @MarcMosby 不确定,ios 7 状态栏颜色非常棒..

标签: ios colors


【解决方案1】:

在项目的 info.plist 中添加View controller-based status bar appearance,然后将其值设置为YES。之后,将以下方法放在要更改状态栏颜色的任何视图中。

-(UIStatusBarStyle)preferredStatusBarStyle{
return UIStatusBarStyleLightContent;
}

这应该可以解决问题。只需两个简单的步骤。祝你好运。

【讨论】:

    猜你喜欢
    • 2017-01-23
    • 2023-04-01
    • 1970-01-01
    • 1970-01-01
    • 2021-11-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多