We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b90fa03 + da6f882 commit bb10061Copy full SHA for bb10061
SDiPhoneVersion/SDiPhoneVersion.m
@@ -72,7 +72,14 @@ +(DeviceVersion)deviceVersion {
72
73
+(DeviceSize)deviceSize {
74
75
- CGFloat screenHeight = [[UIScreen mainScreen] bounds].size.height;
+ CGFloat screenHeight = ({
76
+ // consider landscape orientation status
77
+ UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation];
78
+ BOOL isLandscape = (orientation == UIDeviceOrientationLandscapeLeft || orientation == UIDeviceOrientationLandscapeRight);
79
+ CGFloat screenHeight = [[UIScreen mainScreen] bounds].size.height;
80
+ CGFloat screenWidth = [[UIScreen mainScreen] bounds].size.width;
81
+ screenHeight = isLandscape ? screenWidth : screenHeight;
82
+ });
83
if (screenHeight == 480)
84
return iPhone35inch;
85
else if(screenHeight == 568)
0 commit comments