Ios repeating local notifications

风格不统一 提交于 2019-12-25 20:02:48

问题


Here are my problems :

  1. Schedule local notifications between two dates every specific day of the week . example : between march 1 and march 20 every sunday
  2. I have more than 64 local notifications to set which is the limit .

    For the first problem i know there is repeatIntervals which i can set to fire notification every Sunday but how can i set them between two dates ? Do i need to calculate manually and find all the Sundays between March 1 and 20 and then set it or there is something better ?


回答1:


Use the NSCalendar to get the specific dates, put in an array, and pass to the scheduleLocalNotification.

In this topic you can have a sample code of how to do it.



来源:https://stackoverflow.com/questions/35866089/ios-repeating-local-notifications

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!