gpt4 book ai didi

iphone - 提醒应用程序 - 重复某个提醒

转载 作者:行者123 更新时间:2023-11-29 13:18:35 28 4
gpt4 key购买 nike

我正在构建一个提醒应用程序,并且对如何设置提醒以每天/每月/每小时重复一次非常感兴趣。

基本上我想设置一些重复的东西,即使我的应用程序没有运行。在我的例子中,本地通知触发。

谢谢!

最佳答案

您可以使用 NSCalendarUnits 轻松设置重复间隔

notification.repeatInterval= NSDayCalendarUnit;

有关更多日历单位,请检查 http://developer.apple.com/library/ios/#documentation/Cocoa/Reference/Foundation/Classes/NSCalendar_Class/Reference/NSCalendar.html#//apple_ref/doc/c_ref/NSCalendarUnit 上的常量

关于iphone - 提醒应用程序 - 重复某个提醒,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14982142/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com