Reputation: 1935
I've read Apple Documentation about Class sizes and their backward compatibility.
It says, that most classes are compatible with iOS 7 and the main restriction is Compact Height value for iPhone.
Has anyone managed to separate iPhone landscape orientation from portrait? It works great for separating iPads from iPhones, but I didn't get any results for iPhone.
I tried: Portrait: wCompact - hRegular Landscape(default): Any - Any
It always uses Portrait version for both orientations.
Upvotes: 0
Views: 79
Reputation: 1421
Create a class to get CGRect:
.h file
@interface FullScreen : UIScreen
+ (CGRect)iOS7StyleScreenBounds;
@end
.m file
#import "FullScreen.h"
@implementation FullScreen
+ (CGRect)iOS7StyleScreenBounds {
UIScreen *screen = [UIScreen mainScreen]; CGRect screenRect;
if (![screen respondsToSelector:@selector(fixedCoordinateSpace)] && UIInterfaceOrientationIsLandscape([UIApplication sharedApplication].statusBarOrientation)) {
screenRect = CGRectMake(screen.bounds.origin.x, screen.bounds.origin.y, screen.bounds.size.height, screen.bounds.size.width);
} else {
screenRect = screen.bounds;
}
return screenRect;
}
@end
and call this class like: [FullScreen iOS7StyleScreenBounds]; in your .m file
Upvotes: 0