有没有一种简单的方法来编辑/修改UILocalNotification [英] Is there a simple way to edit / modify a UILocalNotification

查看:118
本文介绍了有没有一种简单的方法来编辑/修改UILocalNotification的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有更简单的方法来编辑已安排的UILocalNotification的alertBody属性?

Is there an easier way to edit, for example, the alertBody property of an already scheduled UILocalNotification ?

现在,我只是取消通知并安排一个新通知,但当应用需要为3个或更多通知执行此操作时,执行需要很长时间。 。

For now, I just cancel the notification and schedule a new one but when the app needs to do this for 3 or more notifications, it takes long time to execute...

推荐答案

如果文档正确,则无法更改已安排的通知。文档状态为 -scheduleLocalNotification:

If the documentation is correct, you can't alter an already scheduled notification. The doc states for -scheduleLocalNotification::


[...]因为操作系统复制
通知,您可以在预定它的
后发布。

[…] Because the operating system copies notification, you may release it once you have scheduled it.

通知对象由系统复制,无法通过任何(公共)方法访问。因此除了取消通知之外没有其他解决方案。

The notification object is copied by the system and not accessible via any (public) method. So there's no other solution than canceling the notification.

这篇关于有没有一种简单的方法来编辑/修改UILocalNotification的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆