【问题标题】:Status bar transparent and Status Bar Text Color iOS 7状态栏透明和状态栏文本颜色 iOS 7
【发布时间】:2013-10-11 16:39:37
【问题描述】:

所以我在这里阅读了几篇关于更改状态栏文本颜色的帖子,但没有任何效果。所以我最初的问题是状态栏现在在 iOS7 中是透明的,我希望它是白色的黑色文本。所以我将它添加到我的视图控制器中。

self.navigationController.navigationBar.translucent = NO;

好的,现在状态是黑底黑字,无法阅读文字,但至少它不透明。所以现在我做了以下事情。

进入plist并添加了这个

View controller-based status bar appearance  NO

然后我将此添加到我的应用委托

 self.window.backgroundColor = [UIColor whiteColor];

 [[UIView appearance] setTintColor:[UIColor blackColor]];

现在我有一个白色的状态栏,但文本是白色的,所以你看不到它?废话!

如果在 iOS6 上运行,以下行也会使应用程序崩溃

[[UIView appearance] setTintColor:[UIColor blackColor]];

双废!

所以我删除了以下行,以免崩溃。

[[UIView appearance] setTintColor:[UIColor blackColor]];

所以坚持白底白字。

【问题讨论】:

    标签: objective-c ios6 ios7 statusbar


    【解决方案1】:

    最后我去了 plist 留下了上面的所有东西并将其添加到 plist 中

    Status bar style  Gray style (default)
    

    现在是我想要的。

    【讨论】:

      猜你喜欢
      • 2013-08-14
      • 2014-01-21
      • 2013-10-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-10-28
      • 2023-01-13
      相关资源
      最近更新 更多