簡體   English   中英

在通知中心中輕按或首次出現時,獲取特定通知的標識符

[英]Get the identifier of a specific notification when it is tapped in the notification center or tapped when it first appears

我正在嘗試使用userNotificationCenter(_:didReceive:withCompletionHandler :)方法(在Swift 4中)來處理用戶點擊通知時的情況。 但是,我想知道被竊聽的特定通知的標識符,而我還沒有找到實現此目的的方法。 有什么建議么?

原來我要做的就是:

let identifier = response.notification.request.identifier

謝謝您的回應!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM