Skip to content

Instantly share code, notes, and snippets.

@rubenroques
Created May 5, 2014 09:32
Show Gist options
  • Save rubenroques/77285012b9066a53e999 to your computer and use it in GitHub Desktop.
Save rubenroques/77285012b9066a53e999 to your computer and use it in GitHub Desktop.
-(void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
if ([[UIDevice currentDevice] respondsToSelector:@selector(setOrientation:)])
{
[[UIDevice currentDevice] performSelector:@selector(setOrientation:) withObject:(id)UIInterfaceOrientationPortrait];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment