Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save RandyMcMillan/2903359 to your computer and use it in GitHub Desktop.
Save RandyMcMillan/2903359 to your computer and use it in GitHub Desktop.
iOS shouldAutorotateToInterfaceOrientation
- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
// Return YES for supported orientations
if (toInterfaceOrientation == UIInterfaceOrientationLandscapeRight){
return YES;
}
if (toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft){
return YES;
}
if (toInterfaceOrientation == UIInterfaceOrientationPortrait){
return NO;
}
if (toInterfaceOrientation == UIInterfaceOrientationPortraitUpsideDown){
return NO;
} else {return NO;}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment