iOS 跳转
来源:互联网 发布:购买小提琴知乎 编辑:程序博客网 时间:2024/05/20 00:50
最近在工作中运用到了多次页面跳转,比如先从A界面跳到B界面,再从B界面跳到C界面,最后需要从C界面直接跳转到A界面,在这里我讲讲解直接从C界面跳转到A界面的方法。由于小弟技术比较菜,有讲解不好的地方清指教。在iOS开发中,我们通常用得最多的页面跳转方式就是通过NavigationBar的push和pop跳转方法,下面这种跳转方法也是基于NavigationBar的跳转方法。因为NavigationBar跳转时候实际是将各个页面放在一个栈里面,需要往上层跳转时候只需要遍历一遍栈,找到自己想跳转的那个页面。[objc] view plaincopy在CODE上查看代码片派生到我的代码片UIViewController *target = nil; for (UIViewController * controller in self.navigationController.viewControllers) { //遍历 if ([controller isKindOfClass:[SecretGardenController class]]) { //这里判断是否为你想要跳转的页面 target = controller; } } if (target) { [self.navigationController popToViewController:target animated:YES]; //跳转
0 0
- iOS 跳转
- ios 页面跳转问题
- ios 页面跳转
- ios view 跳转方法
- IOS之页面跳转
- iOS 页面跳转方式
- IOS 应用程序间跳转
- ios ViewController 页面跳转
- IOS 页面跳转
- ios 界面跳转设置
- ios页面跳转基础
- ios ViewController 页面跳转
- ios 故事板跳转
- ios ViewController 页面跳转
- ios ViewController 页面跳转
- IOS 应用程序间跳转
- ios ViewController 页面跳转
- ios ViewController 页面跳转
- Android之EventBus的使用
- Cocoa 框架
- Spring4快速入门第一章HelloWorld
- android studio使用教程(六) project和module gradle脚本查看
- Ⅰ.8 如何实现原生浏览器对话框、ActiveX以及更多项的自动化
- iOS 跳转
- Mac OS X El Capitan系统完整性保护System Integrity Protection (SIP)
- VS2012 + OPENCV249 建立属性表配置配
- 监视电池电量和充电状态
- datetime和timestamp区别
- git操作详解(阮一峰)
- Android屏幕适配全攻略(最权威的官方适配指导)
- SpringMVC注解分析01-RequestMapping
- “股权代持”的风险及预防的几个大招(2015)