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

navigationController pop的几种方法

时间:2015-04-10 20:03:05      阅读:129      评论:0      收藏:0      [点我收藏+]

标签:

一,popViewControllerAnimated

[self.navigationController popViewControllerAnimated:YES];

 

二,popToRootViewControllerAnimated

[self.navigationController popToRootViewControllerAnimated:YES];

三,popToViewController

[self.navigationController popToViewController:[self.navigationController.viewControllers objectAtIndex:2] 
      animated:YES];



//假如你要跳转到DeskViewController
for (UIViewController *temp in self.navigationController.viewControllers) {            
            if ([temp isKindOfClass:[DeskViewController class]]) {
                [self.navigationController popToViewController:temp animated:YES];
            }
        }

 

 

 

navigationController pop的几种方法

标签:

原文地址:http://www.cnblogs.com/shidaying/p/4415391.html

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