美文网首页
iOS 状态栏字体颜色设置

iOS 状态栏字体颜色设置

作者: STONEsh | 来源:发表于2020-04-21 09:59 被阅读0次

步骤1、
打开 info.plist 文件,设置属性 View controller-based status bar appearance 值为 NO;

步骤2、
点击项目名称,选择General 找到 Status Bar Style 选择对应的属性。也可以在 Application.m 的 didFinishLaunchingWithOptions 方法中添加代码:

[UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleLightContent;

此操作皆为全局操作。
(如果某一个控制器需要单独处理,可将上边代码,放到对应方法中即可)

相关文章

网友评论

      本文标题:iOS 状态栏字体颜色设置

      本文链接:https://www.haomeiwen.com/subject/fgbyihtx.html