Ios 在我的应用程序中,最新通知正在取代以前的通知,如何停止此行为?
在我的应用程序中,最新的通知正在取代以前的通知,如何停止此行为将显示在通知中心中显示所有通知,直到用户清除为止Ios 在我的应用程序中,最新通知正在取代以前的通知,如何停止此行为?,ios,swift,unusernotificationcenter,Ios,Swift,Unusernotificationcenter,在我的应用程序中,最新的通知正在取代以前的通知,如何停止此行为将显示在通知中心中显示所有通知,直到用户清除为止 if #available(iOS 10.0, *) { let center = UNUserNotificationCenter.current() //center.delegate = self center.requestAuthorization(options: [.sound, .alert, .badge]) { (granted, erro
if #available(iOS 10.0, *) {
let center = UNUserNotificationCenter.current()
//center.delegate = self
center.requestAuthorization(options: [.sound, .alert, .badge]) { (granted, error) in
if error == nil{
UIApplication.shared.registerForRemoteNotifications()
}
}
} else {
UIApplication.shared.registerUserNotificationSettings(UIUserNotificationSettings(types: [.sound, .alert, .badge], categories: nil))
UIApplication.shared.registerForRemoteNotifications()
}
查看此内容并设置通知的内容标识符:或从代码中删除此行:UIApplication.shared.applicationIconBadgeNumber=0或从代码中删除此行:UIApplication.shared.applicationIconBadgeNumber=0,不工作查看此内容并设置通知的内容标识符:或从代码中删除此行:UIApplication.shared.ApplicationConBadgeNumber=0或从代码中删除此行:UIApplication.shared.ApplicationConBadgeNumber=0,不工作