Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Hour 18. Validating Data > Entering Data into the Interface and Moving It to th...

Entering Data into the Interface and Moving It to the Data Model (and Vice Versa)

In the code you have seen so far, it has been simple to enter data and move it into the model. In your interface files, you have created text fields. At the appropriate moments, your detail view controller has moved data from the Core Data managed object to or from the text field. In the examples so far, this has happened in configureView (typically called from viewDidLoad and other places where necessary) and in save or a similar method. Here is the typical code to move data from the view controller (self) to a text field in the interface called name:

self.name.text = [self.detailItem valueForKey:@"name"];


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint