修改状态栏的方法

UIView *statusBarView=[[UIView alloc] initWithFrame:CGRectMake(0, 0, ScreenWidth, 20)];
statusBarView.backgroundColor=[UIColor blackColor];
[self.view addSubview:statusBarView];
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:NO];

原文地址:https://www.cnblogs.com/yangliangliang/p/4384723.html