刚好登录注册界面用到
记录一下
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作为背景了。
导横条显隐属性,NO 显示 YES 隐藏
self.navigationController.navigationBarHidden =NO;
网友评论