From the course: iOS Lean Controllers: 2 Controls, Views, Extensions, and Networking

Unlock this course with a free trial

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

Saving records using generic providers and data sources

Saving records using generic providers and data sources

- [Instructor] Alright, welcome back. Now in this final part of implementing the generic data providers and data sources, we're gonna look at the how we can change our code, update our code, to list the new items that are being added, and also, adding the ability to delete the items. Let's go ahead and run our application so we'll have a much better idea of what exactly is going on. So here's our application. I'm going to try to add one more shopping list over here, so let's add Costco, and you will see that it crashes right inside the Fetch Results Provider because the delegate, if you want to see, is nil. Alright? So we have to do that. We have to make sure that the delegate is not nil. Let's go to the Table View Data Source, where we're passing all that stuff and over here, we are already passing something called Fetch Results Provider, and we can set the delegate to self meaning Table View Data Source. So self.Fetch Results Provider.delegate equals to self. Since we're using self…

Contents