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 ...
随机推荐
- wc命令--Linux统计文件行数
语法:wc [选项] 文件… 说明:该命令统计给定文件中的字节数.字数.行数.如果没有给出文件名,则从标准输入读取.wc同时也给出所有指定文件的总统计数.字是由空格字符区分开的最大字符串. 该命令各选 ...
- kali linux 一些工具及命令集1(搜集DNS信息)
DNS信息收集 1.dnsdict6 用于查看ipv6的dns信息,国内很少ipv6,基本无用 2.dnsmap 收集dns信息,同类别还有dnsenum,dnswalk 使用dnsmap需先找到 ...
- Embedded之memory type
1 Types of memory 2 Characteristics
- enum 使用
1.说明 enum是一个基本的关键字,却一直没弄清楚怎么用,这次在实现二叉树框架时需要用到常量,特地搜了一下,终于知道怎么用了. 2.enum使用要点 enum声明是一个类型,不是变量. enum经常 ...
- 解决“运行arm-linux-gcc命令,提示No such file or directory”的问题
今天在ubuntu14.04上安装arm的交叉编译器arm-linux-gcc,环境变量配置好以后,运行arm-linux-gcc命令,总提示No such file or directory.然后去 ...
- httpd.conf 禁止运行PHP和html页面
<VirtualHost *:80> ServerName www.test.com DocumentRoot /var/www/www.test.com ErrorDo ...
- Operation not applicable
ClientDataSet.DataSetProvider1 Operation not applicable ClientDataSet1->Open(); 解决办法 1.update new ...
- Windows PE3.0制作方法(从Win7中提取制作)
Windows PE3.0制作方法(从Win7中提取制作 在d:新建文件夹winpe,在winpe中新建sources.pe3和new文件夹,把附件中提供的工具imagex连文件夹一起放到winpe目 ...
- json的一些问题
使用json不仅可以这么写,{"ARCHIVAL_CODE":"String","TDQLR":"String"} 还可 ...
- LIS LCS n^2和nlogn解法 以及LCIS
首先介绍一下LIS和LCS的DP解法O(N^2) LCS:两个有序序列a和b,求他们公共子序列的最大长度 我们定义一个数组DP[i][j],表示的是a的前i项和b的前j项的最大公共子序列的长度,那么由 ...