Login required for access
In order to watch this lesson, you'll need to login to the website.
Core Data Singleton Context
Intermediate Training Core Data
Core Data can be a strange beast with all of the moving parts involved setting up our objects. One particular class called NSManagedObjectContext is especially difficult to predict if you have multiple instances of it interacting with Core Data. In today's lesson, we look at what happens when we lose reference to our context and attempt to show data inside of our UI. The solution to maintain our context across our application is to use a Singleton object that lives on forever inside of our application. Inside of this singleton, we keep our NSPersistentContainer property and derive our context using it.

Comments (15)
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
HELP & SUPPORT