I have an array of EKReminder
objects and I would like to sort them by due date.
This seems easy at first, doing something like this:
NSSortDescriptor *dateDescriptor = [NSSortDescriptor sortDescriptorWithKey:@"dueDate" ascending:YES];
[remindersArray sortUsingDescriptors:@[dateDescriptor]];
However the due date of an EKReminder
is an NSDateComponents
object not an NSDate
.
Any ideas?
So, after some research I managed to solve it relatively easy:
Hope this helps someone!