Book Image

Core Data iOS Essentials

By : Bintu Harwani, B. M. Harwani
Book Image

Core Data iOS Essentials

By: Bintu Harwani, B. M. Harwani

Overview of this book

Core Data is the essential ingredient in data driven iOS apps. It's used for storing, retrieving, and manipulating application data in databases, XML, and binary formats. It's an essential component for iPhone, iPod Touch, and iPad apps.Core Data Essentials provides a clear, readable guide to the most useful aspects of Core Data. Built around a realistic example app, the book showcases the most important aspects of Core Data development in the context of a complete, functioning app written in Objective C.The book starts with a tour of how the app works. Then you'll see how to easily display data using the Table View. You'll learn how to develop an appropriate data model that fits the needs of your app, then implement that model as updatable data objects. You'll see how to update data and build relationships between objects and learn how Core Data can work with search, and how to provide your users with friendly data editing features.
Table of Contents (19 chapters)
Core Data iOS Essentials
About the Author
About the Reviewers

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...