如何在present出來的viewController裏使用push方法

   

MenuViewController * menuViewController = [[MenuViewController alloc] init];spa

    menuViewController.delegate = self;orm

    UIViewController * controller = self.view.window.rootViewController;it

    controller.modalPresentationStyle = UIModalPresentationCurrentContext;io

    menuViewController.view.backgroundColor = [UIColor clearColor];sso

    menuViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;方法

    UINavigationController * jackNavigationController = [[UINavigationController alloc] initWithRootViewController:menuViewController];im

imageNamed:@"navigationBar_bg.png"] forBarMetrics:UIBarMetricsDefault];
animate

    [self presentViewController:jackNavigationController animated:YES completion:^{view

     }];vi

這樣你就能夠在present出來的viewController裏暢通使用push方法退出其餘界面了。

對了,

UIViewController * controller = self.view.window.rootViewController;

    controller.modalPresentationStyle = UIModalPresentationCurrentContext;

這兩句是在第二個UIViewController中能夠設置alph看到第一個UIViewController的界面;也就是第一個UIViewController做爲背景了,,,

相關文章
相關標籤/搜索