Skip to content

Instantly share code, notes, and snippets.

@seanbollin
Created November 27, 2013 05:19
Show Gist options
  • Save seanbollin/7671006 to your computer and use it in GitHub Desktop.
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
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