2012-09-05 77 views
1

所以自动丢弃,你有这样的:的iOS本地通知和-不是最最快烧-64与iOS本地通知

Each application on a device is limited to the soonest-firing 64 scheduled local 
notifications. The operating system discards notifications that exceed this limit. It 
considers a recurring notification to be a single notification. 

有一种简单的方法添加一个通知时,要弄清楚当另一个通知被推出了64个最快的范围时,被“丢弃”了?是否需要手动循环遍历所有通知,并“猜测”引发最后一个通知的通知,找出哪些会被删除?

干杯

回答

0

以我的经验,本地通知在由fireDate下令一个NSArray回来,所以你只需要抓住最后一个。

NSArray *array = [[UIApplication sharedApplication] scheduledLocalNotifications]; 

UILocalNotification *willBeRemoved = [array lastObject]; 

希望帮助:)