一,popViewControllerAnimated

[self.navigationController popViewControllerAnimated:YES];

二,popToRootViewControllerAnimated

[self.navigationController popToRootViewControllerAnimated:YES];

三,popToViewController

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

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

navigationController pop的几种方法的更多相关文章

  1. #IOS-navigation中左滑pop的三种方法

    IOS-navigation中左滑pop的三种方法 系统自带pop方法 如果我们没有对navigation中的back按钮进行自定义,我们可以直接使用系统自带的左滑pop方法.但是如果我们对back按 ...

  2. 小胖说事29-----iOS中Navigation中左滑pop页面的三种方法

    第三中类型.自己定义任何位置返回页面的方式,上边的类就是.m,大家能够贴过去使用.这个类是继承NavigationController的.用这个类初始化rootController就能够了.这里还有源 ...

  3. 【原创】内核ShellCode注入的一种方法

    标 题: [原创]内核ShellCode注入的一种方法 作 者: organic 时 间: 2013-05-04,04:34:08 链 接: http://bbs.pediy.com/showthre ...

  4. 实现LRU的两种方法---python实现

    这也是豆瓣2016年的一道笔试题... 参考:http://www.3lian.com/edu/2015/06-25/224322.html LRU(least recently used)就不做过多 ...

  5. javascript中数组的22种方法

    × 目录 [1]对象继承 [2]数组转换 [3]栈和队列[4]数组排序[5]数组拼接[6]创建数组[7]数组删改[8]数组位置[9]数组归并[10]数组迭代[11]总结 前面的话 数组总共有22种方法 ...

  6. 趣味算法:字符串反转的N种方法(转)

    老赵在反对北大青鸟的随笔中提到了数组反转.这的确是一道非常基础的算法题,然而也是一道很不平常的算法题(也许所有的算法深究下去都会很不平常).因为我写着写着,就写出来8种方法……现在我们以字符串的反转为 ...

  7. Hdu2544 最短路径 四种方法

    Problem Description 在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的t-shirt.但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累的!所以现在他们想要 ...

  8. Android获取APK包名的几种方法

    Android获取APK包名的几种方法:1.adb shell pm list package -f | findstr 关键字 #只能获取到包名,主Activity名无法获取到 2.使用aapt-- ...

  9. Java实现字符串反转的8种方法

    /** * */ package com.wsheng.aggregator.algorithm.string; import java.util.Stack; /** * 8 种字符串反转的方法, ...

随机推荐

  1. rspec中的shared_examples与shared_context有什么不同

    What is the real difference between shared_examples and shared_context ? My observations : I can tes ...

  2. 基本套接字编程(7) -- udp篇

    1. UDP概述         UDP 是User Datagram Protocol的简称, 中文名是用户数据报协议,是OSI(Open System Interconnection,开放式系统互 ...

  3. Spring JdbcTemplate 调用存储过程

    遇到调用存储过程的业务,以前有用过,但不是用Spring的 JdbcTemplate去做的,这次是在一个已经有的SpringMVC框架的项目下写处理存储过程的. 参考网络中的方法,在实际操作中遇到两个 ...

  4. while语句

    <?php    $num=10;//被除数   $cs=2;   $str="";   while ($num !=0) {          $ys=$num % $cs ...

  5. 简单的css js控制table隔行变色

    (1)用expression 鼠标滑过变色: <style type="text/css"><!-- table { background-color:#0000 ...

  6. ArcGIS API ArcGISDynamicMapServiceLayer.setVisibleLayers对带有GroupLayer图层组的数据无效(针对LayerInfo)问题探讨

    首先看下setVisibleLayers方法: setVisibleLayers(ids, doNotRefresh?) Sets the visible layers of the exported ...

  7. shell选择语句

    if语句 1) if ... else 语句 if ... else 语句的语法: if [ expression ] then Statement(s) to be executed if expr ...

  8. jquery 监听input输入值事件

    <html> <head> <title></title> <script type="text/javascript" sr ...

  9. dataGrid转换dataTable

    #region dataGrid转换dataTable   /// <summary>   /// dataGrid转换dataTable   /// </summary>   ...

  10. Runtime 交换方法

    创建UIImage分类UIImage+Image.h #import<UIKit/UIKit.h> @interfaceUIImage (Image) + (__kindof UIImag ...