I have a game with menu - level select - game vc
I'd like to dump the user out to the menu after the game, but I'm doing presentModalViewController's and if I keep a reference to level select VC in my game VC I can dismiss it, but then we see the level select screen for a split second before going back to the menu... ( no animations )
开发者_高级运维Is there another way to do this? All I know is having a top bar ( navigationController? ) which I don't want showing and this presentModal way I'm currently using to switch view controllers.
How I dismiss the game view controller:
- (void)dismissMe {
NSLog(@"dismissMe");
[mParentVC dismissModalViewControllerAnimated:NO];
// [self dismissModalViewControllerAnimated:NO];
}
You can set the rootViewController on the UIWindow object.
[[UIApplication] sharedApplication].keyWindow.rootViewController = theVCYouWantDisplayed
You can use UINavigationController with navigationBarHidden property set to YES
精彩评论