代码之家  ›  专栏  ›  技术社区  ›  Jatiendar Kumar

如何计算每次到达时推送通知中的徽章值?

  •  -1
  • Jatiendar Kumar  · 技术社区  · 11 年前

    如何计算每次到达时推送通知中的徽章值?

    徽章值每次增加1

    1 回复  |  直到 11 年前
        1
  •  0
  •   Achin    11 年前

    使用此代码,委托方法检查页面值

    - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo{
        NSDictionary *notification = [userInfo objectForKey:@"aps"];
        //notification is what you want. print it to find out the details. 
        //Title, Badge Count and all that
    }