Changes

Jump to: navigation, search

An iOS 4 iPhone Core Data Tutorial

1,138 bytes added, 19:55, 27 October 2016
m
Text replacement - "<table border="0" cellspacing="0">" to "<table border="0" cellspacing="0" width="100%">"
<table border="0" cellspacing="0" width="100%">
<tr>
<td width="20%">[[Working with iOS 4 iPhone Databases using Core Data|Previous]]<td align="center">[[iPhone iOS 4 Development Essentials|Table of Contents]]<td width="20%" align="right">[[An Overview of iOS 4 iPhone Multitouch, Taps and Gestures|Next]]</td>
<tr>
<td width="20%">Working with iOS 4 iPhone Databases using Core Data<td align="center"><td width="20%" align="right">An Overview of iOS 4 iPhone Multitouch, Taps and Gestures</td>
</table>
<hr>
 
 
<htmlet>ios9_upgrade</htmlet>
 
 
In the previous chapter, entitled [[Working with iOS 4 iPhone Databases using Core Data]], an overview of the Core Data stack was provided, together with details of how to write code to implement data persistence using this infrastructure. In this chapter we will continue to look at Core Data in the form of a step by step tutorial that implements data persistence using Core Data in an iOS 4 iPhone application.
Select the coreData entry from the top of the Groups & Files list to display all the files in the project and scroll down to MainWindow.xib. Double click on this file to load it into the Interface Builder tool. From the Library window, drag and drop a View Controller object onto the MainWindow.xib window. Once released, the new view controller should appear beneath the existing objects as illustrated in the following figure:
<htmlet>adsdaqbox_flow</htmlet>
[[Image:core_data_mainwindow.jpg]]
With the actions and outlets defined, now is a good time to design the user interface and establish the connections. To load the Interface Builder tool, double click on the coreDataViewController.xib file. The user interface and corresponding connections used in this tutorial are the same as those in previous data persistence chapters. The completed view should, once again, appear as follows:
<google>ADSDAQBOX_FLOWIOSBOX</google>
[[Image:iphone_core_data_tutorial_layout.jpg|The view layout of the iPhone Core data example application]]
[[Image:ios_4_iphone_core_data_app.jpg|An iOS 4 iPhone Core Data Example App running]]
 
 
<htmlet>ios9_upgrade</htmlet>
 
 
 
<htmlet>ezoicbottom</htmlet>
<hr>
<table border="0" cellspacing="0" width="100%">
<tr>
<td width="20%">[[Working with iOS 4 iPhone Databases using Core Data|Previous]]<td align="center">[[iPhone iOS 4 Development Essentials|Table of Contents]]<td width="20%" align="right">[[An Overview of iOS 4 iPhone Multitouch, Taps and Gestures|Next]]</td>
<tr>
<td width="20%">Working with iOS 4 iPhone Databases using Core Data<td align="center"><td width="20%" align="right">An Overview of iOS 4 iPhone Multitouch, Taps and Gestures</td>
</table>

Navigation menu