Created
January 4, 2014 16:30
-
-
Save ethanmick/8257083 to your computer and use it in GitHub Desktop.
Loading the Menu from Cocos2D
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
- (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!"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
fun. I'll have to give it a whirl.