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

详细页面:http://www.verydemo.com/demo_c134_i47798.html

转:http://blog.youkuaiyun.com/totogo2010/article/details/7682433

是上篇,我们接着讲UINavigationController的重要作用,页面的管理和切换

首先我们需要新一个View。新建SecondView,按住Command键然后按N,弹出新建页面,我们新建SecondView


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



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

SecondViewController这是title为    secondView. =; 默认情况下,titie为下个页面返回按钮的名字。

[cpp] view plaincopy
这是点击GotoSecondView 按钮,出现

这就是SecondView了。


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


这就是segmentedController。

[cpp] view plaincopy

…………………………………………………………………………
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值