Skip to content

Instantly share code, notes, and snippets.

@denniss
Created May 20, 2013 23:23
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 denniss/5616387 to your computer and use it in GitHub Desktop.
Save denniss/5616387 to your computer and use it in GitHub Desktop.
cocos2d protrait for both ios5 and 6
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return UIInterfaceOrientationIsLandscape(interfaceOrientation);
}
//and
if ([[UIDevice currentDevice].systemVersion floatValue] < 6.0) {
// warning: addSubView doesn't work on iOS6
[window_ addSubview:navController_.view];
}
else {
// use this mehod on ios6
[window_ setRootViewController:navController_];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment