MenuViewController * menuViewController = [[MenuViewController alloc] init];
menuViewController.delegate = self;
UIViewController * controller = self.view.window.rootViewController;
controller.modalPresentationStyle = UIModalPresentationCurrentContext;
menuViewController.view.backgroundColor = [UIColor clearColor];
menuViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
UINavigationController * jackNavigationController = [[UINavigationController alloc] initWithRootViewController:menuViewController];
imageNamed:@"navigationBar_bg.png"] forBarMetrics:UIBarMetricsDefault];
[self presentViewController:jackNavigationController animated:YES completion:^{
}];
这样你就可以在present出来的viewController里畅通使用push方法退出其他界面了。
对了,
UIViewController * controller = self.view.window.rootViewController;
controller.modalPresentationStyle = UIModalPresentationCurrentContext;
这两句是在第二个UIViewController中可以设置alph看到第一个UIViewController的界面;也就是第一个UIViewController作为背景了,,,
如何在present出来的viewController里使用push方法