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 ...
随机推荐
- 利用DescriptionAttribute定义枚举值的描述信息 z
System.ComponentModel命名空间下有个名为DescriptionAttribute的类用于指定属性或事件的说明,我所调用的枚举值描述信息就是DescriptionAttribute类 ...
- SPF详解
什么是SPF? 这里的SPF不是防晒指数,而是指Sender Policy Framework.翻译过来就是发信者策略架构,比较拗口,通常都直接称为SPF. SPF是跟DNS相关的一项技术,它的内容写 ...
- Android中垃圾回收日志信息
原因 GC_CONCURRENTfreed 178K, 41% free 3673K/6151K, external 0K/0K, paused 2ms+2msGC_EXPLICITfreed 6K, ...
- EditText 光标不显示问题
android:textCursorDrawable="@drawable/bg_txt_cursor" <?xml version="1.0" enco ...
- 【工作备忘】suricata
因为工作遇到的困难,我向suricata的某个作者发送了邮件. On Wed, Sep 11, 2013 at 8:22 AM, likeyi <929812468@qq.com> wro ...
- Hadoop概念学习系列之分布式数据集的容错性(二十七)
一般来说,分布式数据集的容错性有两种方式: 1.数据检查点 2.记录数据的更新 我们面向的是大规模数据分析,数据检查点操作成本很高:需要通过数据中心的网络连接在机器之间复制庞大的数据集,而网络带宽往往 ...
- Model&Animation
[Model&Animation] 1.FBX文件是一个完整的模型,通常内含Mesh,Material,Texture,Animation,即内含构成一个完成GameObject所需要的一切组 ...
- listview的tag
tag,记录一行数据的唯一标识,小DEMO: lsShow.Items.Add("洗衣机"); lsShow.Items[].Tag = "我不愿让你一个人"; ...
- hdoj 5317 RGCDQ
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5317 #include<stdio.h> ; int F[MAXN]; bool flag ...
- Oracle 分区字段数据更新
分区字段是不允许进行update操作的,如果有对分区字段行进update,就会报错——ORA-14402:更新分区关键字列将导致分区的更改. 可以通过打开表的row movement属性来允许对分区 ...