I have a table that is populated by an NSArray mcData
in my AppDelegate implementation file. I want to create a detail view with a grouped table that pulls its data from that same array. 开发者_运维技巧However, I can't seem to figure out a way to use a single object with multiple properties to fill a table. Any ideas, or should I take a different approach?
Thanks!
You can simple use the same array.
In the detailed you just retain it @property (nonatomic,retain) NSArray* mcData;
In the .m file synthesize it and use it as a datasource for the tableView.
Also, don't forget to release it once you are done with the view
You want to map the row index to the property of your object (i.e. 0 = "name", 1 = "zipcode", 2 = "yadayada", etc). Make sense? Is that what you're trying to do?
精彩评论