[英]Customize the notification options in iOS 10
您可以為此使用類別,以便自定義自己的操作。 請參閱Apple Docs
一些示例代碼-
UNNotificationAction* stopAction = [UNNotificationAction
actionWithIdentifier:@"STOP_ACTION"
title:@"Stop"
options:UNNotificationActionOptionForeground];
// Create the category with the custom actions.
UNNotificationCategory* expiredCategory = [UNNotificationCategory
categoryWithIdentifier:@"TIMER_EXPIRED"
actions:@[stopAction]
intentIdentifiers:@[]
options:UNNotificationCategoryOptionNone];
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.