NSFetchedResultsController

Instead of using the usual

NSFetchRequest *request = [NSFetchRequestfetchRequestWithEntityName:@”SomeClass”];

which is prone to String typos, rather use

NSFetchRequest *request = [NSFetchRequestfetchRequestWithEntityName:NSStringFromClass([SomeClassclass])];

This is a neat way to tie the name of the class to the entity.

Of course you have to make sure that you have done the whole CoreData DataModel and create entity based on the entities created in the model.

Advertisements

Leave a comment

No comments yet.

Comments RSS TrackBack Identifier URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s