目前知道有两种方式,自己小结一下:
方式一:
UINavigationController *presentNav = [[UINavigationController alloc] initWithRootViewController:vcReply]; [self.window.rootViewController presentViewController:presentNav animated:YES completion:^{ }];
方式二:
if ([self.window.rootViewController isKindOfClass:[UINavigationController class]]) { UINavigationController *nacvAD = (UINavigationController *)self.window.rootViewController; [nacvAD pushViewController:vcReply animated:YES]; }