I have a table view that is populated by objects in an array. I want to give the user the option to delete table entries. I was wondering if it would be easier if I used NSDictionary instead of NSMutableArray? How do you know when to use NSDictionary instead of NSMutableArray?
+1
A:
If your data is based on a key-value scheme, use dictionary. Otherwise use an array. It is purely design decision based on the kind of data you are dealing with. If you are using dictionary, make sure that there are no multiple entities for same key!
Or even, using an array of dictionary objects would serve the purpose.
Usually NSArray is preferred as datasource rather than NSDictionary.
Raj
2010-09-20 09:48:12