From the course: iOS Lean Controllers: 1 Setup, Persistent Data, and Implementation

Unlock this course with a free trial

Join today to access over 22,400 courses taught by industry experts.

Communicating between the data provider and data source

Communicating between the data provider and data source

- [Instructor] Hi and welcome back to the part two of implementing the data source. So let's go first and see what problems we were facing. And if I run the app, you will see that the app actually displays all the shopping lists that are in the database and it displays this inside our table view control which is very good. But, when I try to add a new shopping list, let's say Kroger, it doesn't display anything. Even though that particular shopping list Kroger is now saved in the database. But if I run the app again you're gonna see it appearing in the list. So let's go ahead and do that and here we go we can see that Kroger is appearing over here but it doesn't appear when I add it, so I have to re-run it again. And the reason is we're not really doing anything in the fetch results controller did change function. And that function is fired whenever you add a new item. We cannot do this over here because we don't have access to our table view. So we have to pass this information to…

Contents