首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

IOS学习之UINavigationController详解与施用(二)页面切换和segmentedController

2012-06-22 
IOS学习之UINavigationController详解与使用(二)页面切换和segmentedControllerIOS学习之UINavigationCont

IOS学习之UINavigationController详解与使用(二)页面切换和segmentedController

IOS学习之UINavigationController详解与使用(一)添加UIBarButtonItem是上篇,我们接着讲UINavigationController的重要作用,页面的管理和切换。

1、RootView 跳到SecondView

首先我们需要新一个View。新建SecondView,按住Command键然后按N,弹出新建页面,我们新建SecondViewIOS学习之UINavigationController详解与施用(二)页面切换和segmentedController


2、为Button 添加点击事件,实现跳转

在RootViewController.xib中和RootViewController.h文件建立连接

IOS学习之UINavigationController详解与施用(二)页面切换和segmentedController


在RootViewController.m中实现代码,alloc一个SecondViewController,用pushViewController到navigationController中去,并为

这就是SecondView了。


3、添加segmentedController

在nav bar这样的效果是如何实现的呢?

IOS学习之UINavigationController详解与施用(二)页面切换和segmentedController

这就是segmentedController。



下篇文件讲下Navigation 的Toobar如何显示和如何自己定义。
 下篇:

IOS学习之UINavigationController详解与使用(三)ToolBar

例子代码:https://github.com/schelling/YcDemo

著作权声明:本文由http://blog.csdn.net/totogo2010/原创,欢迎转载分享。请尊重作者劳动,转载时保留该声明和作者博客链接,谢谢




热点排行