第一步:在plist文件中添加View controller-based status bar appearance 设置为 NO
如图所示
第二步:在Appdelagate的.m文件中
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {}函数中,添加代码
//设置状态栏为白色
[UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleLightContent;
即可