IOS 7 Study - Manipulating a Navigation Controller’s Array of View
Problem
You would like to directly manipulate the array of view controllers associated with a
specific navigation controller
Solution
Use the viewControllers property of the UINavigationController class to access and
modify the array of view controllers associated with a navigation controller
- (void) goBack {
/* Get the current array of View Controllers */
NSArray *currentControllers = self.navigationController.viewControllers;
/* Create a mutable array out of this array */
NSMutableArray *newControllers = [NSMutableArray
arrayWithArray:currentControllers];
/* Remove the last object from the array */
[newControllers removeLastObject];
/* Assign this array to the Navigation Controller with animation */
[self.navigationController setViewControllers:newControllers
animated:YES];
}
IOS 7 Study - Manipulating a Navigation Controller’s Array of View的更多相关文章
- IOS 7 Study - Implementing Navigation with UINavigationController
ProblemYou would like to allow your users to move from one view controller to the other witha smooth ...
- iOS第八课——Navigation Controller和Tab bar Controller
今天我们要学习Navigation Controller和Tab bar Controller. Navigation Controller是iOS编程中比较常用的一种容器,用来管理多个视图控制器. ...
- IOS 7 Study - Displaying an Image on a Navigation Bar
ProblemYou want to display an image instead of text as the title of the current view controlleron th ...
- Tab Bar Controller和Navigation Controller混合使用详细教程
在IPHONE上,NAV和TAB混合使用的案例很多.但很多书籍都没详细介绍这个是怎么使用的.我也找了很久才弄清楚怎么做.现在分享给大家. 1.先建立一个Window-based Application ...
- Status bar and navigation bar appear over my view's bounds in iOS 7
转自:http://stackoverflow.com/questions/17074365/status-bar-and-navigation-bar-appear-over-my-views-bo ...
- navigation controller
一.程序框架 1.程序结构
- Navigation Controller 创建方法
添加Navigation Controller的方法主要有两种: 第一种:主要是通过在storyboard中拖入Object library 中的Navigation Controller 第二种方法 ...
- IOS 7 Study - UIActivityViewController(Presenting Sharing Options)
You want to be able to allow your users to share content inside your apps with theirfriends, through ...
- IOS 7 Study - UIViewController
Presenting and Managing Views with UIViewController ProblemYou want to switch among different views ...
随机推荐
- Java并发编程-总纲
Java 原生支持并发,基本的底层同步包括:synchronized,用来标示一个方法(普通,静态)或者一个块需要同步执行(某一时刻,只允许一个线程在执行代码块).volatile,用来标识一个变量是 ...
- tengine+lua的安装步骤
我是在Red Hat 5.8 的虚机上安装的. Nginx的一些模块需要其他第三方库的支持,例如gzip模块需要zlib库,rewrite模块需要pcre库,ssl功能需要openssl库等.建议把这 ...
- 精品手游《里奥的财富》高清版逆向移植家用机与PC平台(转)
冒险动作游戏<里奥的财富>于去年10月登陆移动平台,曾荣获App Store“年度优秀游戏”.开发商宣布将推出其HD版本,近期会陆续登陆PS4.PC.MAC.Xbox One平台. 由瑞典 ...
- c++11之智能指针
在c++98中,智能指针通过一个模板“auto_ptr”来实现,auto_ptr以对象的方式来管理堆分配的内存,在适当的时间(比如析构),释放所获得的内存.这种内存管理的方式只需要程序员将new操作返 ...
- CentOS 5.5 快速安装MariaDB-5.5.35
被网上各种教程坑的不轻T,T,5.5下不升级yum的情况下想快速安装还真有点费劲 至于源码编译安装坑貌似更多 而且在小内存的VPS上编译实在费力 下载地址 http://yum.mariadb.org ...
- Hadoop学习记录(1)|伪分布安装
本文转载自向着梦想奋斗博客 Hadoop是什么? 适合大数据的分布式存储于计算平台 不适用小规模数据 作者:Doug Cutting 受Google三篇论文的启发 Hadoop核心项目 HDFS(Ha ...
- SQL 脚本
1.USE语句 USE语句用于设置当前数据库,如果没有USE语句,那么就由执行脚本的任何用户来确定执行脚本时当前数据库是正确的.如果只是一个通用脚本,那么省去USE语句实际上可能更有益.通常,如果在脚 ...
- C++11 语法记录
转自:http://blog.csdn.net/crayondeng/article/details/18563121 一.Lambda表达式 C++ 11中的Lambda表达式用于定义并创建匿名的函 ...
- Mongo技巧-连接数据库与修改表结构
1. 连接非本机数据库 mongo.exe之后直接输入ip地址即可 mongo.exe 192.168.163.203 2. 修改表结构 mongo里面没有表结构这个概念,现在采用类似关系型数据库的形 ...
- #用Python直接写UTF-8文本文件
当我们这样建立文件时 f = file('x1.txt', 'w') f.write(u'中文') f.colse() 直接结果应该是类似 f.write(u'中文') UnicodeEncodeEr ...