Created
June 10, 2012 01:08
-
-
Save RandyMcMillan/2903359 to your computer and use it in GitHub Desktop.
iOS shouldAutorotateToInterfaceOrientation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (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