UINavigationController 导航控制器 常用总结

//导航控制器跳转到下一页

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

 

    //返回上一页

    [self.navigationController popViewControllerAnimated:YES];

 

    //返回首页:popToRootViewControllerAnimated   除第一个页面外,其他的页面全部出栈

    [self.navigationController popToRootViewControllerAnimated:YES];

 

 

    //self.navigationController.viewControllers  找到push过去的页面,并放到数组里面

    NSArray *viewController = self.navigationController.viewControllers;

    

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

posted on 2015-09-07 21:41  X了个code  阅读(146)  评论(0编辑  收藏  举报