Navigation1 PUSH & POP

//1.进入第一 push

- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event

{

    FirstViewController *firstVC = [[FirstViewController alloc] init];

    [self.navigationController pushViewController:firstVC animated:YES];

}

 //2.退出莫一页

   //1. 退回到指定控制器

   NSArray *arrayVC = self.navigationController.viewControllers;

   UIViewController *viewController = arrayVC[1];

    [self.navigationController popToViewController:viewController animated:YES];

    

    // 2. 退回上一个界面

  [self.navigationController popViewControllerAnimated:YES];

    

    // 3. 直接返回到根视图

    [self.navigationController popToRootViewControllerAnimated:YES];

原文地址:https://www.cnblogs.com/fanwenzheIOS/p/4973567.html