Skip to content

Instantly share code, notes, and snippets.

@vpx
Created October 21, 2014 21:35
Show Gist options
  • Save vpx/7ef2d9904a106dc171ba to your computer and use it in GitHub Desktop.
Save vpx/7ef2d9904a106dc171ba to your computer and use it in GitHub Desktop.
Force change iOS application orientation mode
#import <objc/message.h>
[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationPortrait]
objc_msgSend([UIDevice currentDevice], @selector(setOrientation:), UIInterfaceOrientationPortrait);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment