Quote:
Originally Posted by alextattoo
Hi , i have a table view with couple of rows and each row open a new detail view with keypad panel for user input. So i want to save that input (2-3 digits number) ,but don't know how to add core data to my second view (detail) controller.Any ideas?
|
Assuming you are registered as a developer with Apple you can download a number of core data samples eg: core data books. Possibly you want a simpler example to start with. You will find lots by googling but make sure the database structure is correct before you start using any core data setup in your app.
In Xcode 4.2 it's not obvious how to get a core data project. Choose master-detail project for example, tick 'use core data' and untick storyboard if you are not using that approach. Same goes for ARC. Untick if you want to use the older way of working with retain release.
Once you have a blank project look at the files. You will see 'projectname'.xcdatamodeld. Click on this and then you are at the start of learning core data. Add your fields & use Editor, create NSManagedObject subclass to create the XCode files to manage the data.