iOS10中的UNNotificationCategory和minimalActions

时间:2016-09-06 16:16:10

标签: notifications ios10 xcode8 swift2.3

根据文档UIUserNotificationActionContext已在iOS 10上弃用,根据弃用邮件,我们应该Use UserNotifications Framework's -[UNNotificationCategory actions] or -[UNNotificationCategory minimalActions]

根据documentation和头文件(Funnily,记录minimalActions的相关页面),问题是UNNotificationCategory不存在minimalActions中的属性exists没有被其他任何东西联系起来)。所以问题是,如何设置iOS 10 beta 8中的最小动作?我在这里缺少什么?

1 个答案:

答案 0 :(得分:2)

早期测试版中存在minimalActions的{​​{1}}属性,但我担心它会在Xcode 8 beta 3中删除,这解释了为什么没有链接到UNNotificationCategory页面更多。相反,设置常规minimalActions属性,iOS将显示最多四个或前两个,具体取决于上下文。