弹出自定义View不显示状态栏的方法
1.首先获取到Window
- (UIWindow *)mainWindow{
UIApplication *app = [UIApplication sharedApplication];
if ([app.delegate respondsToSelector:@selector(window)]) {
return [app.delegate window];
} else{
return [app keyWindow];
}
}
2.在viewDidLoad中更改windowLevel
- (void)viewDidLoad {
[super viewDidLoad];
UIWindow *window = [self mainWindow];
}