Вопрос

enter image description here

  • Here in my application User set list of task to do in weekdays. So I am rescheduling each task at every Friday when user opens the app. So I want to know the list of notification which are left.
  • so What I Need Want to Predicate Timeid or weekday from "ScheduleArray".
Это было полезно?

Решение

Just use:

NSPredicate *predicate = [NSPredicate predicateWithFormat:@"userInfo.WeekDay = %d", yourWeekDay];

or:

NSPredicate *predicate = [NSPredicate predicateWithFormat:@"userInfo.Timeid = %d", yourTimeID];

Then:

NSArray *notifications = [[[UIApplication sharedApplication] scheduledLocalNotifications] filteredArrayUsingPredicate:predicate];
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top