ios本地通知如何设置复杂的重复提醒

比如想它每星期一,星期四,星期五通知用户

就这种不固定的重复提醒 该怎么弄?

阅读 6.2k
1 个回答

NSLocalNotification有个属性,repeatInterval:
repeatInterval
The calendar interval at which to reschedule the notification.

@property(nonatomic) NSCalendarUnit repeatInterval
Discussion
If you assign an calendar unit such as weekly (NSWeekCalendarUnit) or yearly (NSYearCalendarUnit), the system reschedules the notification for delivery at the specified interval. The default value is 0, which means don't repeat.

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题