I am trying to produce a list of todo items for a specific person, I am pushing a view to the user when they select a particular person, at this particular moment all of the todo items, regardless of selected person are displayed. I understand that it is the following piece of code that fetches the todo items, how would I alter that to display the todo items for a specific person?
Each person and todoitem is given a unique objectId, and the todo items are also assigned the person objectId if selected so I can see a way of doing it, but am a little confused as to how you can filter the todo items.
I am trying to produce a list of todo items for a specific person, I am pushing a view to the user when they select a particular person, at this particular moment all of the todo items, regardless of selected person are displayed. I understand that it is the following piece of code that fetches the todo items, how would I alter that to display the todo items for a specific person?
(NSFetchedResultsController *)fetchedResultsController { if (!_fetchedResultsController ) { _fetchedResultsController = [ToDoItem MR_fetchAllGroupedBy:nil withPredicate:nil sortedBy:@"priority" ascending:YES delegate:self]; }
return _fetchedResultsController; }
Each person and todoitem is given a unique objectId, and the todo items are also assigned the person objectId if selected so I can see a way of doing it, but am a little confused as to how you can filter the todo items.