views:

27

answers:

2

I have an application that uses a UITableView to present data that I have stored in an NSArray.

I would like to switch over to using Core Data to host this information to be presented to the table view, but I'm not that familiar with Core Data.

I've created a new Core Data database within my project, but I'm lost as to how to proceed pst this point. What are the steps required to have my UITableView pull its information from the Core Data database?

+1  A: 

You are asking for a lot here :) There are plenty of good tutorials in the wild web that you can read. Here is one :)

Also look at my answer to this question for your alternatives to Core Data

Property Lists is the easiest and most basic one in terms of functionality. It just lets you store primitives, but is good if your TODO list is just a collection of Strings.

Serilization using NSCoding is more powerful, but requires more work from the developer. With NSCoding you can create your own coders/decoders for your business objects that lets you persist the entire state. This would be good if you have your own Todo with a lot of properties, like title, priority, complete-by-date etc.

willcodejavaforfood
Hi, In many tutorials, they create a new Project as a Navigation Based Application. But i dont need that type of applications. I want to use core data for my ordinary UITableView's data. It is possible?
Velmurugan
Yes, just create whatever application type you need :)
willcodejavaforfood
Core Data is kind of complex. You can't just save an array. There are many things you need to do. I would just go through a tutorial until you see what code needs to be added to your project then just add the code once you understand it.
Nimrod
@Nimrod that is a very good point
willcodejavaforfood
@Velmurugan: To give you some idea how complex it is, asking "how do I use core data?" is almost like asking "how do I write my application?"
Nimrod
@Nimrod: I have no idea about Coredata. I am fresher in IPhone application development field. i go through a tutorial. but i cant able to understand how to implement it. i dont know how to give connection, like this. Now i created just an application using NSArray. Now i need to store that NSArray into Coredata
Velmurugan
A: 

As has been pointed out, it would take a while to walk you through each step required to do this, so I recommend consulting the many good resources out there before starting to implement Core Data in your application.

There are several questions here that provide a long list of highly recommended resources for getting started with Core Data:

Brad Larson