Skip to content

Instantly share code, notes, and snippets.

@yoshimax
Created May 18, 2012 18:48
Show Gist options
  • Select an option

  • Save yoshimax/2726980 to your computer and use it in GitHub Desktop.

Select an option

Save yoshimax/2726980 to your computer and use it in GitHub Desktop.
shouldAutorotateToInterfaceOrientation
// http://www.cocos2d-iphone.org/wiki/doku.php/prog_guide:migrate_to_v2.0#ccdirector
// cocos2d v2.0
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
NSLog(@"interfaceOrientation: %d", interfaceOrientation);
return UIInterfaceOrientationIsLandscape(interfaceOrientation);
}
{
CCDirectorIOS* director_ = (CCDirectorIOS*) [CCDirector sharedDirector];
[director_ setDelegate:self];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment