ipad上自定义view的旋转适配
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;
}
}