سؤال

I'm creating a simple notes app, and I just recently learned the basics of Core Data(and i'm a beginner in general).

Now, in the tutorial I learned the basics of Core Data they did not use NSFetchedResultsController at all, and I'm also learning Core Data with Apple sample code and they use it there.

And I'm wondering if should I dig into this and learn how to use NSFetchedResultsController or is it too advanced?

هل كانت مفيدة؟

المحلول

It depends on what you want to do really!

If you want to display a list of objects of the same entity with a filter or order then yes its great for that. If you want to have a form where attribute values of an entity object are change then no!

From the name of the class, its used for a list of fetched results, so if you're only dealing with one object (i.e. the above form case) then its not very useful. The main benefit of using it in a UITableView or UICollectionView is that you get notififed when objects are changed, inserted or deleted that match the predicate of the NSFetchRequest.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top