隐藏状态栏
- 方法1
#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
- (BOOL)prefersStatusBarHidden{
return YES;
}
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
@end
- 方法2
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window.windowLevel = UIWindowLevelAlert;
return YES;
}