Skip to content

Instantly share code, notes, and snippets.

@ethanmick
Created January 4, 2014 16:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ethanmick/8257083 to your computer and use it in GitHub Desktop.
Save ethanmick/8257083 to your computer and use it in GitHub Desktop.
Loading the Menu from Cocos2D
- (void)openMenu:(CCMenuItem *)item;
{
// UI KITTTTTTTTTT
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"DMMainMenu_iPhone" bundle:nil];
UIViewController *menu = [storyboard instantiateViewControllerWithIdentifier:@"DMMainMenuNavigationController"];
menu.modalPresentationStyle = UIModalPresentationFullScreen;
menu.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
if (menu) {
[[CCDirector sharedDirector] presentViewController:menu animated:YES completion:^{
[[CCDirector sharedDirector] pause];
}];
} else {
DLog(@"ERROR LOADING MENU!");
}
}
@PaulSolt
Copy link

PaulSolt commented Jan 5, 2014

fun. I'll have to give it a whirl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment