IOS 如何判断横竖屏,返回屏幕宽度
2016-11-21 本文已影响191人
0诛仙0
NSInteger width = 0;
UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation;
CGSize size = [UIScreen mainScreen].bounds.size;
if (UIInterfaceOrientationIsLandscape(orientation)) {
width = size.height;
} else {
width = size.width;
}