Remove reminders using NSPredicate iOS -
I am trying to remove the reminder using NSPddicates, but they are not being removed is my code: < / p>
NSPredicate * predicate = [eventStore predicateForIncompleteRemindersWithDueDateStarting: ending [datepicker1 date]: [datepicker2 date] calendar: zero] [eventStore fetchRemindersMatchingPredicate: predicate completion: ^ (NSArray * reminder) for the { (EK Reminders * Reminder in Reminder) {[Reminder for Removing Eventstore: Reminder Commit: Yes Error: Shun E]; }}];
You must also specify the calendar parameter
EKESTSTOR * EventStore = [[EKESTSTOR ALLOW] INIT]; NSArray * calendarArray = [NSArray arrayWithObject: [EventStore default calendarForm new events]]; NSPredicate * predicate = [eventStore predicateForIncompleteRemindersWithDueDateStarting: [datepicker1 date] ending: [datepicker2 date] calendars: calendarArray] [eventStore fetchRemindersMatchingPredicate: predicate completion: ^ (Reminder for Reminder * Reminder) {[eventStore removerReminder : Reminder Commit: Yes Error: Zero]; }}];
I hope this should work.
Comments
Post a Comment