I want to introduce a modalviewcontroller after every push message that the application receives in the application "application: (UIApplication *) didReceiveRemoteNotification: (NSDictionary *) userInfo"
I present the viewcontroller as follows:
ReleaseViewController *viewController = [[ReleaseViewController alloc] init]; UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:viewController]; [self.window.rootViewController presentModalViewController:navController animated:YES];
So, when another push message arrives and the old ModalViewController is still visible, I want to introduce a new modalviewcontroller on top of the old one. But that will not work. Nothing happened and the console just says (I think this is a debug message from iOS 6 Beta):
Warning: Attempt to present <UINavigationController: 0x1dde6c30> on <UINavigationController: 0x1dd73c00> whose view is not in the window hierarchy!
What am I doing wrong?
PS: I do not want to reject the old ViewController, I want them to be a stack.
Thanks!
CrEaK source share