EventKit 框架中的 Snooze 方法?
我能够访问 EKEventStore 的所有功能,例如保存任何事件或从日历中删除任何事件。
但是如何为该事件创建暂停,比如说我为所有 saveEvent 需要 15 分钟的暂停?
我没有找到这样的方法
有人知道这样的方法吗?
I am able to access all functionality of EKEventStore like save any event or remove any event from Calendar.
But how can create snooze for that event lets say 15 min snooze i needed for all saveEvent ?
I didn't find out as such method
Anyone know such method ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您尝试将应用程序中的某些功能设置为在十五秒延迟后执行,您可以使用如下内容:
EventKit 旨在为用户设置本地通知,无论用户是否正在运行您的应用程序,都可以显示该通知。它们与推送通知完全相同,只不过它们存储在用户设备本地并且不需要网络连接。
如果您尝试向 EventKit 通知添加暂停功能,您可以使用 ApplicationDidLoadWithOptions 方法在应用程序中实现它。每当用户单击本地通知上的“确定”按钮时,就会调用该方法。据我所知,EventKit 框架本身没有内置的贪睡功能。
If you are trying to set some function in your application to be performed after a fifteen second delay, you could use something like this:
EventKit is intended to set local notifications for the user that can be shown whether the user is running your application or not. They are exactly like push notifications, except they are stored locally on the user's device and don't require a network connection.
If you are are trying to add a snooze function to an EventKit notification, you could implement it in your application using the ApplicationDidLoadWithOptions method. That method is called whenever the user clicks the "OK" button on your local notification. As far as I know, there is no built in snooze functionality in the EventKit framework itself.
我从未尝试过该库,但你尝试过 NSTimer 吗?比如:
也许这不是你要找的,但它可能有用:)
I've never tried that library, but have you tried
NSTimer
? Something like:Maybe it's not what you're looking for, but it might work :)