ios8横屏时宽高会自动转换,但是ios7不是
CGFloat screenWidth = [UIScreen mainScreen].bounds.size.width;
CGFloat screenHeight = [UIScreen mainScreen].bounds.size.height;
if (!iOS8)
{
UIInterfaceOrientation interfaceOrientation = [[UIApplication sharedApplication] statusBarOrientation];
if (UIInterfaceOrientationIsLandscape(interfaceOrientation))
{
CGFloat tmp = screenWidth;
screenWidth = screenHeight;
screenHeight = tmp;
}
}