码迷,mamicode.com
首页 > 其他好文 > 详细

Navigation1 PUSH & POP

时间:2015-11-18 10:34:51      阅读:111      评论:0      收藏:0      [点我收藏+]

标签:

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

 

Navigation1 PUSH & POP

标签:

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!