Need simple sample program for core data in iPhone
Could please share a simple program(or link) to understand core data in iPhone. The program should cover add & delete a entry in tabl开发者_开发问答e view. Program without IB is preferable.
Thank you
Read the blog on CoreData from apple
Building a Sample Core Data Application
Read more
Cocoa Dev Central . Articles . Build a Core Data App
iPhone Core Data: Your First Steps
Core Data Tutorial: Getting Started
Have you read through the core data programming guide on the Apple Developer center? link
Take a look at the Stanford iPhone development course, in particular lecture 12 http://www.stanford.edu/class/cs193p/cgi-bin/drupal/downloads-2010-fall
Apple also have a lot of sample code in the developer program, including an excellent introduction to core data http://developer.apple.com/library/ios/#documentation/DataManagement/Conceptual/iPhoneCoreData01/Introduction/Introduction.html#//apple_ref/doc/uid/TP40008305
- Open Xcode
- File -> New Project
- iOS or Mac App, you choose
- Select the App Type (Master-Detail, etc) again, you choose
- Choose Next
- Give it a name, company identifier
- Check the box next to "Use CoreData"
- Choose Next
- Find a home on the file system for your new app (~/Documents will work just fine)
- Choose Create
- Open [Your App Name]AppDelegate.m and notice that Xcode wrote all the coredata scaffolding for you!
I was also looking for simple example regarding this but unfortunately could not found which tells me straight forward. Here is what I have prepared. It is very basic example iOS project, shows only save and retrieve data in SQLite using pure Core Data framework. http://www.iosmobileapps.biz/examples/CoreDataEx.zip Hope you will find this useful.
精彩评论