在iOS 8中,[UIScreen mainScreen].边界.大小是否变得与方向有关?
UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation]; BOOL landscape = (orientation == UIInterfaceOrientationLandscapeLeft || orientation == UIInterfaceOrientationLandscapeRight); NSLog(@"Currently landscape: %@, width: %.2f, height: %.2f", (landscape ? @"Yes" : @"No"), [[UIScreen mainScreen] bounds].size.width, [[UIScreen mainScreen] bounds].size.height);
Currently landscape: No, width: 320.00, height: 568.00Currently landscape: Yes, width: 568.00, height: 320.00
Currently landscape: No, width: 320.00, height: 568.00Currently landscape: Yes, width: 320.00, height: 568.00
当年话下
守候你守候我
小唯快跑啊