有没有办法在屏幕上延长通知时间直到通知声音结束?
我正在使用iOS 10.1,Swift 3.0
let content = UNMutableNotificationContent()
content.title = NSString.localizedUserNotificationString(forKey: "Hello", arguments: nil)
content.body = NSString.localizedUserNotificationString(forKey: title, arguments: nil)
var sound = "\(mySound)" + ".caf"
content.sound = UNNotificationSound.init(named: sound)
let trigger = UNCalendarNotificationTrigger(dateMatching: dateComp, repeats: false)
let request = UNNotificationRequest(identifier: identifer, content: content, trigger: trigger) // Schedule the notification.
let center = UNUserNotificationCenter.current()
center.add(request)