页面的跳转
2015-08-20 15:18
246 查看
页面的跳转有3种方式:
1.在window上创建2个UIView ,将原来的View从window上移除,将另一个View添加到window上
2.模态弹出或者模态消除:模态弹出一个视图控制器,弹出的新控制器view会覆盖本身的view
RegistVC *vc = [[RegistVC alloc]init];
[self presentViewController: vc animated :YES completion:nil];
//模态消失
[self dismissViewControllerAnimated:YES completion:nil];
3.创建根视图控制器 UINavigationController
MainVC *vc = [[MainVC alloc]init];
UINavigationController *nvc = [[UINavigationController alloc]initWithRootViewController:vc]
UIWindow *window = [[[UIApplication sharedApplication]delegate]window];
window.rootViewController = nvc;
1.在window上创建2个UIView ,将原来的View从window上移除,将另一个View添加到window上
2.模态弹出或者模态消除:模态弹出一个视图控制器,弹出的新控制器view会覆盖本身的view
RegistVC *vc = [[RegistVC alloc]init];
[self presentViewController: vc animated :YES completion:nil];
//模态消失
[self dismissViewControllerAnimated:YES completion:nil];
3.创建根视图控制器 UINavigationController
MainVC *vc = [[MainVC alloc]init];
UINavigationController *nvc = [[UINavigationController alloc]initWithRootViewController:vc]
UIWindow *window = [[[UIApplication sharedApplication]delegate]window];
window.rootViewController = nvc;
相关文章推荐
- SPOJ FAVDICE
- linux下搭建gsoap环境
- PL/SQL之游标的使用
- Hbuilder检测不到真机的解决方法
- slickgird链接
- Gamebryo 游戏引擎分析(二)内存管理
- Powershell Module for Netapp Data Ontap
- Powershell Module for Netapp Data Ontap
- ajax 中根据json数据不同 对页面中 选择框radio 进行动态选择
- exchange2013的搜索邮件跟踪日志功能
- Rtmpdump
- Android中内容观察者的使用---- ContentObserver类详解
- 自定义控件 实现文本框输入模仿下拉框选择功能
- 操作系统原理——(线程相关)
- [Leetcode] maximum gap
- 字符串匹配的KMP算法
- iOS循环引用
- array_multisort — 对多个数组或多维数组进行排序
- Apple Watch和机械手表的纠结
- Minimum Path Sum