参考文章https://my.oschina.net/shede333/blog/304560
设置状态栏的前景颜色
179A8795-E0F9-4BBC-9DA4-4A32AA593AB1.png1.首先需要在plist里设置View controller-based status bar appearance为NO
2.在控制器的viewDidAppear设置代码
[UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleLightContent;
设置状态栏隐藏
[UIApplication sharedApplication].statusBarHidden=YES;
设置状态栏启动页时或加载广告是没有状态栏,首页时显示状态栏
7514A569-67D7-467E-BDAA-3D19B793C8F6.png1首先在plist设置状态栏隐藏
2.在首页viewDidAppear设置代码
[UIApplication sharedApplication].statusBarHidden=NO;
网友评论