views:

57

answers:

1

Hi Guys,

I have a list reusable UItableViewCells. As what I want: after selecting one of the cells, the app should update the images on each Cell.

For solving this requirement, I use method visibleCells to fetch all the cells from UITableView, and update the images in each cell by iterating the returned cell array.

But the problem is: I can not get all the cells, method visibelCells only returns the cells currently appear on the iPhone screen.

So, any idea about how to get all the reusable cells into one array?

+2  A: 

I think that you may be misunderstanding how the UITableView is implemented. The important point to understand is that cells that are not visible don't actually exist (or at least they might not)

Accordingly, you should update the images on the visible cells and update the images on other cells as they become visible in your implementation of

-(UITableViewCell) cellForRowAtIndexPath (NSIndexPath *)indexPath

TomH