iOS 从AppDelegate中跳转指定页面
来源:互联网 发布:js中日期时间格式化 编辑:程序博客网 时间:2024/05/20 16:36
最近几天开发项目的推送功能,需要在推送回调中跳转到指定页面,
当然这部分的内容网上基本都有,我也找了很多的资料,
在这里总结一下,以备以后使用
1.模态跳转
这种方法也是目前网上最多的一种方法,具体代码如下:
MessageViewController *VC = [[MessageViewController alloc] init]; UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:VC]; [self.window.rootViewController presentViewController:nav animated:YES completion:nil];
2.Push跳转
有时候我们根据需求,需要使用push方法跳转页面,让跳转更舒服,
具体代码如下:
UITabBarController *tab = (UITabBarController *)_window.rootViewController; UINavigationController *nav = tab.viewControllers[tab.selectedIndex]; MessageViewController *vc = [[MessageViewController alloc] init]; vc.hidesBottomBarWhenPushed = YES; [nav pushViewController:vc animated:YES];
阅读全文
0 0
- iOS 从AppDelegate中跳转指定页面
- iOS跳转指定页面
- Appdelegate里面跳转页面
- IOS 框架页面跳转、Appdelegate.m控制返回rootVC
- Appdelegate跳转到指定tabbaritem
- iOS开发中点击推送跳转到指定页面
- ios 跳转指定页面和插入页面
- ios 跳转指定页面和插入页面
- iOS 收到推送从AppDelegate push 到详细页面
- iOS中页面跳转
- IOS 在AppDelegate 页面中push到另一个页面
- iOS 从一个APP跳转到另一个APP,并带参数跳到指定页面
- IOS推送消息处理跳转指定页面
- iOS UINavigationController跳转到指定页面
- ios 指定返回的跳转页面
- iOS导航跳转到指定页面
- IOS 通知栏点击跳转指定页面
- ios-应用程序跳转到指定的页面
- 华为研发工程师编程题:进制转换 [python]
- redis的筑基之路(二)
- linux和ARM下Qwt的安装与使用
- Postman(一)
- Retrofit原理浅析
- iOS 从AppDelegate中跳转指定页面
- getDrawable()过时替换方案.md
- P2P在你不知道的时候获取你的资料,数据量竟与微信相同
- Qt之实现3D纹理渲染自由旋转空间立方体
- jwplayer遇到的问题
- c指针5
- 删除本地文件
- ECharts.js学习(一) 简单入门
- 程序员晒晒你的【神器】!