如何在present出来的viewController里使用push方法
1个回答
2016-11-26
展开全部
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作为背景。
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作为背景。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询