iOS:UILocalNotification数组大于64(Swift)

时间:2014-11-16 16:16:57

标签: ios swift uilocalnotification

当我的应用关闭或进入后台时,我会运行一个功能来安排UILocalNotification s。

文件说明如下:

  

应用只能有有限数量的预定通知;系统保持最快的64个通知(自动重新安排的通知计为单个通知)并丢弃其余通知。

这是否意味着我可以安排我想要的所有通知,系统会为我设计合适的64位?

我怀疑的原因是,当我运行以下内容时,我仍然会看到100多个条目:

func applicationDidBecomeActive(application: UIApplication) {
    // Print the total number of notifications scheduled
    println(UIApplication.sharedApplication().scheduledLocalNotifications.count)
    // Clear the notification queue once they re-start the application. They will be rescheduled upon next exit
    UIApplication.sharedApplication().cancelAllLocalNotifications()
}

所以即使在我退出应用程序并重新启动它之后,仍有100多个通知,系统似乎没有"丢弃剩下的"。

0 个答案:

没有答案