【ios开发学习 - 第一课】页面跳转
来源:互联网 发布:拼图游戏制作软件 编辑:程序博客网 时间:2024/05/20 01:10
第一种
[self.navigationController pushViewController:subTableViewController animated:YES];
//描述:通过 NSNavigationBar 进行跳转 [self.navigationController popViewControllerAnimated:YES]; //描述:在子视图返回到上级视图第二种
UIViewController *control = [[UIViewController alloc] init]; [self presentModalViewController:control animated:YES]; [control release]; //描述:通过事件进行跳转 [self dismissModalViewControllerAnimated:YES]; //描述:通过事件进行返回。第三种
[self.view.window addSubview:otherview]; [self.view removeFromSuperview]数据传递:
1)采用代理模式 子viewcontroller设计 代理协议,定义协议接口,父viewcontroller 实现协议接口,实现子viewcontroller 退出时将相关数据更新到父视图。
2)采用ios的消息机制 父viewcontroller注册消息 子viewcontroller 发送消息,触发父viewcontroller的消息处理。
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(setData:) name:kNotificationMessage object:nil];//注册监听,其中setData用来处理消息
[[NSNotificationCenter defaultCenter] postNotificationName:kNotificationMessage object:self userInfo:infoDict];//发送消息
3)采用database做为数据中间的存储媒介,子viewcontroller将状态数据存入DB,父viewcontroller从DB获取数据更新view。
4)采用ios的NSDefault 存储
5)通过AppDelegate 中定义全局变量实现中间数据的存储。
1 0
- 【ios开发学习 - 第一课】页面跳转
- ios开发:跳转到根视图并跳转到第一个tabbar第一个页面
- iOS开发页面跳转
- iOS开发之页面跳转
- iOS开发笔记--连续跳转上层页面
- ios开发中页面(跨页)跳转
- iOS开发--跳转进入AppStore评论页面
- iOS开发实现页面的跳转
- ios开发系列之页面跳转
- iOS开发笔记--连续跳转上层页面
- iOS开发Modal页面跳转动画效果
- iOS开发关于远程推送页面跳转
- iOS开发笔记--连续跳转上层页面
- iOS应用开发中实现页面跳转
- iOS开发中页面跳转的方法
- 总结:ios 界面开发 页面间跳转
- ios开发之Xib的页面跳转
- ios学习-delegate、传值、跳转页面
- eclipse Failed to create the part's controls 解决方法
- linux系统信息命令
- OC:继承
- fastjson 解析
- Android 下拉选择
- 【ios开发学习 - 第一课】页面跳转
- Python游戏编程笔记_BGDwPaP_0303
- Linux权限管理1——ACL权限
- RT5350共享定时器
- linux 文件和目录管理
- leetcode--Binary Tree Level Order Traversal II
- OC:多态
- 学习笔记
- 测试博客测试博客