iOS10 中的 UNNotificationCategory 和 minimalActions

UNNotificationCategory and minimalActions in iOS10

根据文档,UIUserNotificationActionContext 已于 iOS 10 弃用,根据弃用信息,我们应该 Use UserNotifications Framework's -[UNNotificationCategory actions] or -[UNNotificationCategory minimalActions]

问题是 minimalActionsUNNotificationCategory 中不作为 属性 存在,根据 documentation and the header file (Funnily, a relevant page documenting minimalActions exists 没有被任何其他链接)。所以问题是,如何在 iOS 10 beta 8 中设置最少的操作?我在这里错过了什么?

UNNotificationCategoryminimalActions 属性 存在于较早的 beta 中,但恐怕在 Xcode 8 beta 3 中已被删除,这就解释了为什么没有任何链接到那个 minimalActions 页面了。相反,设置常规 actions 属性,并且 iOS 最多显示四个或前两个,具体取决于上下文。