UI本地通知

编程入门 行业动态 更新时间:2024-10-18 08:21:10
本文介绍了UI本地通知 - 背景重新安排的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在学习使用swift开发ios的应用程序,我有一个疑问,已经用Google搜索,我找不到。

I'm learning to develop application for ios with swift, and I'm one doubts, already googled and i not found.

我正在创建一个-do list app,并且想知道是否有办法在用户看来时重新安排通知

I'm creating a to-do list app, and was wondering if there is a way to reschedule a notification when it appears to the user

例如用户每两小时注册一个任务,然后通知显示给用户并试用新通知

For example the user registers a task every two hours, then the notification appears to the user and reagendo the new notification

任何人都可以帮助我吗?

Can anyone help me?

谢谢

推荐答案

如果您的应用被暂停,则无法在后台执行此操作。但UILocalNotification支持循环通知。 您所要做的就是声明重复间隔: notif.repeatInterval = NSDayCalendarUnit;

You can't do it in background if your app is suspended. But UILocalNotification supports recurrent notifications. All you have to do is to declare the recurring interval: notif.repeatInterval = NSDayCalendarUnit;

你可以找到更多详细信息。

请注意,您无法设置自定义时间间隔。您必须使用默认的的由Apple提供。

Note that you can't set custom intervals. You must use the default ones provided by Apple.

更多推荐

UI本地通知

本文发布于:2023-07-14 10:02:12,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1104040.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:通知   UI

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!