ios 状态栏 覆盖自定义View

UIWindow中有相关层级设定的如下设置

[cpp] view plaincopy

  1. typedef CGFloat UIWindowLevel;  

  2. const UIWindowLevel UIWindowLevelNormal; // 0.0  

  3. const UIWindowLevel UIWindowLevelAlert; // 2000.0  

  4. const UIWindowLevel UIWindowLevelStatusBar; // 1000.0  


StatusBar的层级是1000 所以只需要将UIWindow层级设置为

UIWindowLevelAlert即可
然后接下来在改变层级的UIWindow中放置View便可以遮挡状态栏的位置了


你可能感兴趣的:(ios 状态栏 覆盖自定义View)