UIWindow

    UIWindow *statusBarWindow = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
    statusBarWindow.windowLevel = UIWindowLevelStatusBar;
    
    UIWindow *statusBarW = ((UIWindow *)([[UIApplication sharedApplication] valueForKey:@"_statusBarWindow"]));
    
    
    NSLog(@"
UIWindowLevelNormal=%.f 
UIWindowLevelAlert=%.f 
UIWindowLevelStatusBar=%.f 
statusBarW=%.f 
statusBarWindow=%.f", UIWindowLevelNormal, UIWindowLevelAlert, UIWindowLevelStatusBar, statusBarW.windowLevel, statusBarWindow.windowLevel);

控制器Log:

UIWindowLevelNormal=0 
UIWindowLevelAlert=2000 
UIWindowLevelStatusBar=1000 
statusBarW=1000 
statusBarWindow=1000
原文地址:https://www.cnblogs.com/xiu619544553/p/5581658.html