Applying the update feature
Sometimes we need to update the information of our customers. This happens when the contact number or e-mail address of a customer is changed or some misspelling occurs while storing the customer's information. In these cases, we don't want to delete the customer's record but instead want to update or modify the information stored earlier. Let us apply the same feature to our application.
We will define a protocol by the name: DisplayCustomerControllerDelegate
in the DisplayCustomerController
class that will declare a method to save the modifications done in the customer's information to the persistent store. The RootViewController
class will be declared as a delegate of the DisplayCustomerControllerDelegate
protocol and hence, will implement the method of storing the modified customer's information to the persistent store. We will also add an Edit button to the View of the DisplayCustomerController
class, which will invoke an action method, which will subsequently...