Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
可能重复: 自定义警报的 UILocalNotification 重复间隔(周日、周一、周二、周三、周四、周五、周六)
我是 Xcode 的新手。我需要在我的应用程序中使用本地通知。本地通知具有属性 repeatinterval,它只能具有有限的值(每分钟、每小时、每天重复一次等)。但我需要让通知以更灵活的方式重复(例如:每天 3 次)。有没有办法做到这一点??
大约一个月前,我自己对此进行了彻底的调查。您只能以单个repeatInterval时间间隔获得自动重复 - 每分钟,每小时或每天等。如果您想要任何更好的控制,您必须自己做。由于您希望每天收到三次通知,因此安排三个通知,分别为 8 小时、16 小时和 24 小时,每个通知一天重复一次。
repeatInterval