Summary
In this chapter, you learned about Core Data and its different components. You created data models for your app named Review
and RestaurantPhoto
, and you created the corresponding model objects for your app named ReviewItem
and RestaurantPhotoItem
. After that, you implemented CoreDataManager
to set up Core Data components for your app.
You updated ReviewFormViewController
and PhotoFilterViewController
to save reviews and photos together with a restaurant identifier to the persistent store. You modified RestaurantDetailViewController
to load reviews for a particular restaurant based on the restaurant identifier, and displayed them in a collection view. You also calculated and displayed the overall rating for that restaurant.
Finally, on your own, you modified RestaurantDetailViewController
to load photos for a particular restaurant based on the restaurant identifier, and displayed them in a collection view.
You now have a basic understanding of how Core Data works...