Changes

An iPhone OS Core Data Tutorial

54 bytes added, 15:39, 3 August 2010
Connecting the View
== Connecting the View ==
The next step is to add the new view controller to the project, associated associate it with the view NIB file and connect it to the application delegate.
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:
Display the Attributes page by selecting the far left toolbar button in the inspector window and assign ''coreDataViewController''as the NIB file:
Finally, establish a connection between the application delegate and the view controller. This is achieved by clicking on the ''core Data App Delegate'' item in the ''MainWindow.xib'' window, dragging the resulting blue line to ''Core Data View Controller'' item in the same window and selecting ''viewController'' from the menu:  [[Image:iphone_core_data_make_connection. jpg]]  With the ''Core Data View Controller'' item selected in the ''MainWindow.xib'' file and the Connections Inspector displayed, the settings should appear as shown in the following figure: