views:

346

answers:

2

I am a beginner for iPhone development, I use core data as backed store and show multiple data entities on UITableView. Each data entity will be show as a preview thumbnail, one table view cell will hold 1 to 4 thumbnail. That's means 3 table cells may show at most 12 data entities, just like iPhone Photo.

I also need operate to each of the preview thumbnail directly, never for the whole table view cell.

If show one data entity on one table cell, NSFetchedResultsController is perfect. But on my scenario, the NSFetchedResultsController's index path is not match with table view's index path. May I know what's the good practice to use NSFetchedResultsController on this case? should I use table view to support this implementation?

+1  A: 

I don't know if it implements the exact class you want, but you may want to check out the three20 open source project. It contains most of the controls and such from the Facebook application. If it has the photo picker then you may be in luck.

Nimrod
+1 The TTThumbsViewController in Three20 may be the best solution here. Three20 is linked from the answer to "Table with rows and columns, iphone" http://stackoverflow.com/questions/2040543/table-with-rows-and-columns-iphone/2040598#2040598
gerry3
A: 

I would create an entity that encapsulates 4 url strings. Then fetch that entity and feed those url strings to your class responsible for downloading the images.

If you don't want to do that, then you will have to fall back on the normal NSFetchRequest and parse the retuned data yourself. Just go through the returned array and pull of 4 urls at a time. Should be a trivial piece of code.

Corey Floyd