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.

Deleting an order

Deleting an order - iOS Tutorial

From the course: iOS Development: Siri Shortcuts

Start my 1-month free trial

Deleting an order

- [Instructor] In order to delete the orders, go ahead and open OrdersTableViewController and scroll down to the commit editingStyle function, which is a delegate function of a tableView. You can see that we are getting the selected order, but right now we are not really deleting it from our user default, we are simply filtering it. So let's go ahead and remove this portion. We will use our coffee order manager, and going to call deleteOrder, passing in the actual order that we want to delete. We don't really have any function called deleteOrder right now, but don't worry about it, we are going to get it working. Also, in the dispatch main.async, we are going to go ahead and call populateOrders, which is going to populate the orders and refresh our tableView. populateOrders has been defined on line number 38 'til 43. Now it's time to implement the deleteOrder function, which should be part of the CoffeeOrderDataManager.…

Contents