Set default iOS local notification style for application

前端 未结 6 441
囚心锁ツ
囚心锁ツ 2020-11-28 09:25

Starting with iOS 5, there are two notification styles: banner and alert (the \"old\" style). A user can set which style to use for each application in the settings. However

6条回答
  •  难免孤独
    2020-11-28 09:58

    You can use this line to query the current settings for notification style:

    UIRemoteNotificationType* enabledTypes = [[UIApplication sharedApplication] enabledRemoteNotificationTypes];
    

    You can check the enabledTypes and then instruct the user to change the notification style in the settings.

提交回复
热议问题