In the case when the data should change inside the cells, I do not use the identifier method dequeueReusableCellWithIdentifier: (NSString *). This prevents the caching of a UITableView cell. When the table view cells scroll from the screen, they are released. There is a delegate method,
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
which is called immediately before your cell. You can use this, pass indexPath to the manager.
When your data returns, I usually call the method
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
to get the cell, then set the text in the cell and call its superclass method UIView, - (void)setNeedsLayout .
This will tell the cell to redraw.
Another way I did this is to use a custom cell, and this custom cell subclass calls the dispatcher for its data directly when drawing it. When the data is returned, it calls the delegate's own method to update its internal UILabel objects, and then calls setNeedsLayout.
source share