I am checking the default Xcode template for the iPhone Core Data project. In the method that returns the selected result controller, I see the following:
- (NSFetchedResultsController *)fetchedResultsController { ... NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"Event" inManagedObjectContext:managedObjectContext]; [fetchRequest setEntity:entity]; ... return fetchedResultsController; }
It seems that the name of a specific entity is given. What if I have multiple objects? Will I have two instances of NSFetchedResultsController and there are two methods that return the correct controller depending on which object I use?
thanks
objective-c iphone cocoa-touch core-data nsfetchedresultscontroller
indragie
source share