문제

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