Skip to content

Instantly share code, notes, and snippets.

@sugarmo
Created May 14, 2014 09:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sugarmo/987f9b058d0b23747ebb to your computer and use it in GitHub Desktop.
Save sugarmo/987f9b058d0b23747ebb to your computer and use it in GitHub Desktop.
Force Device to Rotate
if ([[UIDevice currentDevice] respondsToSelector:@selector(setOrientation:)]) {
objc_msgSend([UIDevice currentDevice], @selector(setOrientation:), newOrientation);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment