How to add multiple reminders to an event in iOS calendar
In the calendar app that comes with iOS, we can only set up to two reminders for one event, but through code, we can set any number of reminders for the event.
The code for setting reminders for events can be found in my article:
In iOS9, how to create a reminder that starts before any time in the calendar App (3)
The method for setting multiple reminders is similar. We only need to create multiple reminders and add them to the event:
EKAlarm * alarm = [EKAlarm alarmWithRelativeOffset:-7.f]; event. title = @ "Event with Alarm"; [event addAlarm: alarm]; EKAlarm * alarm2 = [EKAlarm alarmWithRelativeOffset:-17.f]; [event addAlarm: alarm2]; EKAlarm * alarm3 = [EKAlarm alarmWithRelativeOffset:-27.5f]; [event addAlarm: alarm3];
However, after the reminder is set in this way, we open the calendar App that comes with the iOS system, we will find that only two reminders are displayed, and no additional reminders are displayed. however, the actual test shows that all reminders can work, and we can see all the reminders in the calendar program of Mac: