diff --git a/SDiPhoneVersion/SDiPhoneVersion.m b/SDiPhoneVersion/SDiPhoneVersion.m index 1abd9ba..6d504fe 100644 --- a/SDiPhoneVersion/SDiPhoneVersion.m +++ b/SDiPhoneVersion/SDiPhoneVersion.m @@ -74,7 +74,6 @@ +(DeviceVersion)deviceVersion { +(DeviceSize)deviceSize { CGFloat screenHeight; - UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation]; if (orientation == UIDeviceOrientationPortrait) @@ -82,15 +81,7 @@ +(DeviceSize)deviceSize { else if((orientation == UIDeviceOrientationLandscapeRight) || (orientation == UIInterfaceOrientationLandscapeLeft)) screenHeight = [[UIScreen mainScreen] bounds].size.width; - - CGFloat screenHeight = ({ - // consider landscape orientation status - UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation]; - BOOL isLandscape = (orientation == UIDeviceOrientationLandscapeLeft || orientation == UIDeviceOrientationLandscapeRight); - CGFloat screenHeight = [[UIScreen mainScreen] bounds].size.height; - CGFloat screenWidth = [[UIScreen mainScreen] bounds].size.width; - screenHeight = isLandscape ? screenWidth : screenHeight; - }); + if (screenHeight == 480) return iPhone35inch;