1.首先在plist文件中添加一key值: View controller-based status bar appearance 设置为 NO
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
//状态栏设为白色
[UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleLightContent;
self.window=[[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds];