Skip to Main Content
Xcode 5 Start to Finish: iOS and OS X Development
book

Xcode 5 Start to Finish: iOS and OS X Development

by Fritz Anderson
May 2014
Intermediate to advanced content levelIntermediate to advanced
624 pages
19h 43m
English
Addison-Wesley Professional
Content preview from Xcode 5 Start to Finish: iOS and OS X Development

Loading Data into MPRDocument

Importing the .csv file is simple—most of the work was done on the iOS side. Add sample-data.csv to the project, declare

- (IBAction) fillWithData: (id) sender;

in MPRDocument.h and put

#import "PRGame.h"    .    .    .- (IBAction) fillWithData: (id) sender{    NSString *  dataPath =    [[NSBundle mainBundle] pathForResource: @"sample-data"                                   ofType: @"csv"];    [PRGame loadFromCSVFile: dataPath                intoContext: self.managedObjectContext                      error: NULL];}into MPRDocument.m.

Note

Action methods, which respond to triggers from user-interface elements, are by convention given the return type IBAction ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Xcode 6 Start to Finish: iOS and OS X Development, Second Edition

Xcode 6 Start to Finish: iOS and OS X Development, Second Edition

Fritz Anderson
Objective-C for Absolute Beginners: iPhone, iPad and Mac Programming Made Easy

Objective-C for Absolute Beginners: iPhone, iPad and Mac Programming Made Easy

Stefan Kaczmarek, Brad Lees, Gary Bennett, Mitch Fisher

Publisher Resources

ISBN: 9780133751031Purchase book