UIWindow中有相關層級設定的以下設置spa
[cpp] view plaincopy.net
typedef CGFloat UIWindowLevel; orm
const UIWindowLevel UIWindowLevelNormal; // 0.0 blog
const UIWindowLevel UIWindowLevelAlert; // 2000.0 get
const UIWindowLevel UIWindowLevelStatusBar; // 1000.0 it
StatusBar的層級是1000 因此只須要將UIWindow層級設置爲UIWindowLevelAlert便可
而後接下來在改變層級的UIWindow中放置View即可以遮擋狀態欄的位置了view