zoukankan      html  css  js  c++  java
  • iOS推送后页面跳转

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{
    <br>
    <br>    if (launchOptions)
    <br>
    <br>    {
    <br>
    <br>        [[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];
    <br>
    <br>        NSDictionary *userInfo = [launchOptions objectForKey: UIApplicationLaunchOptionsRemoteNotificationKey];
    <br>
    <br>        [self presentViewControllerWithUserInfo:userInfo];
    <br>
    <br>    }
    <br>
    <br>}
    <br>
    <br>
    <br>
    <br>//App状态为正在前台或者后台运行,那么此函数将被调用
    <br>
    <br>- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
    <br>
    <br>{
    <br>
    <br>   
    <br>
    <br>    if (application.applicationState != UIApplicationStateActive)
    <br>
    <br>    {
    <br>
    <br>
    <br>
    <br>        [self presentViewControllerWithUserInfo:userInfo];
    <br>
    <br>       
    <br>
    <br>    }
    <br>
    <br>}
    <br>
    <br>
    <br>
    <br>#pragma mark - 消息跳转页面
    <br>
    <br>- (void)presentViewControllerWithUserInfo:(NSDictionary *)userInfo
    <br>
    <br>{
    <br>
    <br>       //拿出你的消息内容,跳转即可~~
    <br>
    <br>[self.window.rootViewController presentViewController:fyfNavCtrl animated:YES completion:^{
    <br>
    <br>                    //
    <br>
    <br>                }];
    <br>
    <br>}

  • 相关阅读:
    Umbraco建站指南[0]:前言
    项目开发中一些不得其解的问题
    Maven Install 的傻问题
    html5 audio/video 操作
    CentOS7.3安装MySQL5.7
    Maven将独立jar包安装到本地库
    MyBatis 中 foreach 语句处理 List<Integer>类型
    站内信系统的设计思路
    Spring+MyBatis项目开发代码步骤
    webpack 配置eslint-standard
  • 原文地址:https://www.cnblogs.com/jx66/p/5366094.html
Copyright © 2011-2022 走看看