Remove a local notification from iPhone by Date

╄→尐↘猪︶ㄣ 提交于 2019-12-19 09:55:21

问题


there is the possibility of a LocalNotification on the iPhone to load on a date? My problem is that I create an event for the notification but i release the object after creation.

Or can I just create a new Object with the same data to delete my Notification?

sorry for my english...


回答1:


scheduledLocalNotifications will give you the list of all scheduled notifications and use

- (void)cancelLocalNotification:(UILocalNotification *)notification

or you can cancel them all using:

 [[UIApplication sharedApplication] cancelAllLocalNotifications];


来源:https://stackoverflow.com/questions/5866146/remove-a-local-notification-from-iphone-by-date

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!