2011-10-31 3 views

답변

2

나는 이미 해고 된 통지를 언급하고있다.

배지를 0으로 설정하면 기존 알림이 지워집니다. 또한 푸시 알림 이외에 로컬 알림도 지워지는지 확인하려고합니다.

0

UIApplication.scheduledLocalNotifications를 사용하여 보류중인 알림 목록을 가져온 다음 제거 할 알림 목록을 취소 할 수 있습니다.

0

취소하려면 이미 전달 알림이 답변에

UNUserNotificationCenter.current().removeDeliveredNotifications(withIdentifiers: ["myidentifier"])

또는

UNUserNotificationCenter.current().removeAllDeliveredNotifications() 

예제 코드를 사용 https://stackoverflow.com/a/45218609/2650588

관련 문제