iOS 状态栏的颜色设置

来源:互联网 发布:黑客数据论坛 编辑:程序博客网 时间:2024/06/04 18:39

在开发过程中  系统默认的状态栏上面的字体是黑色, 为了需求 我们有时候会把这个字体的颜色设置为白色的   只需要两个步骤

第一, 在Appdelegate的didFinishLaunchingWithOptions的方法里面加上

[UIApplicationsharedApplication].statusBarStyle =UIStatusBarStyleLightContent;

这句话  
第二.其info.plist文件里面View controller–based status bar appearance 为NO, 效果如图所示
0 0