ios ViewController 页面跳转
2015-11-18 16:58
489 查看
从一个Controller跳转到另一个Controller时,一般有以下2种:
1、利用UINavigationController,调用pushViewController,进行跳转;这种采用压栈和出栈的方式,进行Controller的管理。调用popViewControllerAnimated方法可以返回。
PickImageViewController *ickImageViewController = [[PickImageViewController alloc] init];
[self.navigationController pushViewController: ickImageViewController animated:true];
[ickImageViewController release];
2、利用UIViewController自身的presentModalViewController,进行跳转;调用dismissModalViewControllerAnimated方法可以返回。
PickImageViewController *ickImageViewController = [[PickImageViewController alloc] init];
[self presentModalViewController:ickImageViewController animated:YES];
//返回
[self dismissModalViewControllerAnimated:YES];
from:http://longquan.iteye.com/blog/1666292
1、利用UINavigationController,调用pushViewController,进行跳转;这种采用压栈和出栈的方式,进行Controller的管理。调用popViewControllerAnimated方法可以返回。
PickImageViewController *ickImageViewController = [[PickImageViewController alloc] init];
[self.navigationController pushViewController: ickImageViewController animated:true];
[ickImageViewController release];
2、利用UIViewController自身的presentModalViewController,进行跳转;调用dismissModalViewControllerAnimated方法可以返回。
PickImageViewController *ickImageViewController = [[PickImageViewController alloc] init];
[self presentModalViewController:ickImageViewController animated:YES];
//返回
[self dismissModalViewControllerAnimated:YES];
from:http://longquan.iteye.com/blog/1666292
相关文章推荐
- 对IOS中NSStream与Socket的理解
- iOS中线程Call Stack的捕获和解析(二)
- iOS中线程Call Stack的捕获和解析(一)
- AFNetworking 传cookie
- ios 开发日记 22-iOS 保持界面流畅的技巧
- iOS应用逆向工程(五):利用Cycript 定位目标函数
- iOS7以后 视图Frame坐标起点发生的变化
- iOS开源框架 JCPullToSelect
- 提高IOS开发效率的工具
- iOS开发之CocoaPods的安装与使用
- iOS collectionViewLayout布局和自定义
- iOS--tableview的标题头尾设置
- IOS学习周期
- iOS框架结构
- iOS开发 如何让navigationBar不半透明
- iOS控件-3级城市列表-plist版
- iOS quartz 画双层空心圆,带百分比进度条
- Mac iOS RSA 私钥和公钥的生成
- iOS URL编码(全编):
- iOS float类型不精确