From the course: iOS Development: Siri Shortcuts

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Using CoffeeOrderDataManager

Using CoffeeOrderDataManager - iOS Tutorial

From the course: iOS Development: Siri Shortcuts

Start my 1-month free trial

Using CoffeeOrderDataManager

- [Instructor] Now that we have our Coffee Order Data Manager implementation in place, we can start using it to persist our coffee orders, as well as, fetch the coffee orders from the user defaults. Open up the Order Tables View Controller, and create an instance of the Coffee Order Data Manager. You can even mark this with private property, meaning that this is only going to be available when you are inside the Orders Table View Controller class. Go ahead and initialize Coffee Order Data Manager. And now we can start using it. Currently, inside our viewed load, we don't really have any function to fetch all the existing coffee orders. Let's go ahead and create a function called Populate Orders. Now, we can go ahead and provide the implementation of Populate Orders, which will be responsible for fetching all the orders from the user defaults. Self.orders. Self.coffeeorderdatamanager.getallorders. And we're also going to make…

Contents