ios 将状态栏改为白色方法!

1在Info.plist中设置UIViewControllerBasedStatusBarAppearance 为NO
2 在需要改变状态栏颜色的ViewController中在ViewDidLoad方法中增加:

 [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];

如果需要在全部View中都变色,可以写在父类的相关方法中,或者写到AppDelegate中。

posted @ 2016-03-18 17:32  ZPengs  阅读(397)  评论(0编辑  收藏  举报