views:

8

answers:

1

This is probably very basic but I am struggling.
I have an NSFetchedResultsController that gets managed objects from an entity I specify. The problem is I want to only display the managed objects that have a certain attribute in my table view.

- (void)configureCell:(UITableViewCell *)cell atIndexPath:(NSIndexPath *)indexPath {
NSManagedObject *managedObject = [self.fetchedResultsController objectAtIndexPath:indexPath];

cell.textLabel.text = [[managedObject valueForKey:@"title"] description];

So this is where the cells get assigned titles but I cant see how to only display certain managed objects.

Any help is appreciated.

A: 

Sounds like you need to construct a predicate to filter the objects you're retrieving. The Apple documentation has several useful snippets for doing things like this.

warrenm