我想像imessage一样开发交互式通知。我阅读文档,我尝试将多个UIMutableUserNotificationAction添加到UIMutableUserNotificationCategory并显示它。我想像iMessage一样显示文本字段。这是我的问题
UIMutableUserNotificationCategory *notificationCategory = [[UIMutableUserNotificationCategory alloc] init];
notificationCategory.identifier = @"Email";
[notificationCategory setActions:@[notificationAction1,notificationAction2,notificationAction3] forContext:UIUserNotificationActionContextDefault];
[notificationCategory setActions:@[notificationAction1,notificationAction2] forContext:UIUserNotificationActionContextMinimal];
请帮助
答案 0 :(得分:0)
let replyAction = UIMutableUserNotificationAction()
replyAction.identifier = "REPLY_ACTION"
replyAction.title = "Reply"
replyAction.activationMode = UIUserNotificationActivationMode.Background
replyAction.authenticationRequired = false
replyAction.destructive = false
//Set behaviour to .TextInput
replyAction.behavior = .TextInput