File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,14 @@ +(DeviceVersion)deviceVersion {
72
72
73
73
+(DeviceSize)deviceSize {
74
74
75
- CGFloat screenHeight = [[UIScreen mainScreen ] bounds ].size .height ;
75
+ 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
+ });
76
83
if (screenHeight == 480 )
77
84
return iPhone35inch;
78
85
else if (screenHeight == 568 )
You can’t perform that action at this time.
0 commit comments