GLbog
  •  

        UIApplication *app = [UIApplication sharedApplication];

        

    //    根据用户版本,获取用户权限

        if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8) {

            UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeBadge) categories:nil];

            [app registerUserNotificationSettings:settings];

        }

    //    设置徽章

        app.applicationIconBadgeNumber = 18;

    }

分类:

技术点:

相关文章:

  • 2021-12-13
  • 2021-12-31
  • 2022-12-23
  • 2021-12-28
  • 2021-08-25
  • 2021-09-20
  • 2021-06-02
  • 2022-12-23
猜你喜欢
  • 2022-02-02
  • 2022-01-04
  • 2021-04-10
  • 2022-01-14
  • 2021-10-19
  • 2022-01-18
  • 2021-05-02
相关资源
相似解决方案