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 ...
随机推荐
- android面试题(转)
1. Android dvm的进程和Linux的进程, 应用程序的进程是否为同一个概念 DVM指dalivk的虚拟机.每一个Android应用程序都在它自己的进程中运行,都拥有一个独立的Dalvik虚 ...
- 8、NFC技术:让Android自动打开网页
创建封装Uri的NdefRecord public NdefRecord createUri(String uriString); public NdefRecord cre ...
- memcache、memcached、groupcache的区别
对PHP语言来说,PHP使用memcache有两个模块,分别叫memcache和memcached,他们的区别看下表: 参考:http://hi.baidu.com/tony_wd/item/605e ...
- SqlDataReader对象的NextResult方法读取存储过程多个结果集
如上图,我这里有返回4个记录集,分别表示 发送的总数,成功数,失败数,以及所有的记录集,那么我怎么去获取呢? 如果我第二个记录集 第三个记录集 都是多行的话,怎么办?可以参考下面这张图
- jquery禁用右键单击功能屏蔽F5刷新
1.禁用右键单击功能$(document).ready(function() { $(document).bind("contextmenu",function(e) { aler ...
- AudioManager --- generateAudioSessionId
AudioManager中的generateAudioSessionId方法介绍: 1.方法声明 pubilc void generateAudioSessionId(); 2.API描述 返回一个不 ...
- 25个让人无法抗拒的HTML5网站设计实例
原文地址:http://www.goodfav.com/html5-website-designs-8272.html HTML5在其功能方面给网络市场带来了惊人的改进. HTML5是万维网联盟,在起 ...
- 本人为项目组制定的一份页面优化指南(easyui页面优化方案)
#本人为项目组制定的一份页面优化指南(easyui页面优化方案) ##背景 这是一篇我之前为项目组制定的页面优化指南,主要是面向表单页面,典型的像[注册用户](https://passport.cnb ...
- c# webbrowser获取滚动条最大值
int HeightMax = 0; int WidthMax =0; HeightMax = webBrowser1.Document.Body.ScrollRectangle.Height-web ...
- erlang 常用函数
os:getpid() 获得erl.exe的进程表示符 application:start(appname, Type), Type == permanent 表示一个应用死了,其它应用全部死掉 ...