Created
November 27, 2013 05:19
-
-
Save seanbollin/7671006 to your computer and use it in GitHub Desktop.
Hack fix for improper image rotation in landscape-only mode for iOS, Cordova
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (CDV_IsIPhone5()) { | |
imageName = [imageName stringByAppendingString:@"-568h"]; | |
} | |
// else if (CDV_IsIPad()) { | |
switch (orientation) { | |
case UIInterfaceOrientationLandscapeLeft: | |
case UIInterfaceOrientationLandscapeRight: | |
imageName = [imageName stringByAppendingString:@"-Landscape"]; | |
break; | |
case UIInterfaceOrientationPortrait: | |
case UIInterfaceOrientationPortraitUpsideDown: | |
default: | |
imageName = [imageName stringByAppendingString:@"-Portrait"]; | |
break; | |
} | |
//} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment