O'Reilly logo

Learning Mobile App Development: A Hands-on Guide to Building Apps with iOS and Android by Michael Eierman, Jakob Iversen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Saving Data to Core Data

With the data model and the managed object set up, it’s time to start saving the data from the user interface to Core Data.

But first, the user interface on the Contacts screen needs to be changed to add a Save button in the navigation bar. The code to do this is very similar to the Date controller. Open LMAContactsController.m and update the viewDidLoad: method to match Listing 11.7.

Listing 11.7 Adding the Save Button in LMAContactsController.m

- (void)viewDidLoad{    [super viewDidLoad];       // Do any additional setup after loading the view, typically from a nib.        _scrollView.contentSize = CGSizeMake(320,500);    UIBarButtonItem *saveButton =                   [[UIBarButtonItem ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required