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];

 

posted @ 2015-11-18 09:54  破水杯  阅读(182)  评论(0编辑  收藏  举报