自定义UILocalNotification重复间隔 [英] Custom UILocalNotification repeat interval
问题描述
有没有办法指定UILocalNotification应该触发哪些天?我想能够设置不同的日子,让我们说:只在星期一,星期二和星期日发出本地通知。有没有办法做到这一点?非常感谢!
更新:也许我可以为每一天设置多个本地通知,并为每个通知提供NSWeekCaldnerUnit的repeatInterval。这是一种正确的方法吗?
is there a way to specify which days should an UILocalNotification fire? I want to be able to set different days, lets say: fire a local notification only on mondays, tuesdays and sundays. Is there a way to do that? Huge thanks! Update: Maybe I can set multiple local notifications for each of the days and give each of them a repeatInterval of NSWeekCaldnerUnit. Is this a correct approach?
推荐答案
您应该使用三种不同的本地通知。
You should use three different local notification then.
有关可用repeatIntervals的列表,请参阅此处。
For a list of available repeatIntervals see here.
这篇关于自定义UILocalNotification重复间隔的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!