1

https://useyourloaf.com/blog/local-notifications-with-ios-10/

I found this article which works if I just want to add one category of action buttons. But how should I add more than one category?

The code they provided:

UNNotificationCategory *category = [UNNotificationCategory categoryWithIdentifier:@"UYLReminderCategory"
  actions:@[snoozeAction,deleteAction] intentIdentifiers:@[]
  options:UNNotificationCategoryOptionNone];
NSSet *categories = [NSSet setWithObject:category];

[center setNotificationCategories:categories];
Terry Windwalker
  • 1,343
  • 2
  • 16
  • 36

0 Answers0