标签:tco lstat cat 技术分享 lis win stat evel src
状态栏的windowLevel为UIWindowLevelStatusBar,而window的windowLevel为UIWindowLevelNormal。所以一般情况下,状态栏位于window之上。
UIStatusBar的位置和尺寸
1 NSString *statusBarFrame = NSStringFromCGRect([UIApplication sharedApplication].statusBarFrame);
NSLog(, statusBarFrame);
在iPhone 6竖屏测试输出:
2015-08-04 16:33:47.159 Test[6175:205261] {{0, 0}, {375, 20}}
在iPhone 6横屏测试输出:
2015-08-04 16:33:47.159 Test[6175:205261] {{0, 0}, {667, 20}}
在iPhone 6 Plus竖屏测试输出:
2015-08-04 16:33:47.159 Test[6175:205261] {{0, 0}, {414, 20}}
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault];
标签:tco lstat cat 技术分享 lis win stat evel src
原文地址:http://www.cnblogs.com/H7N9/p/6265696.html