Question

I want to load a UITableView that show many addresses. The right detail label of a cell is the distance between the user location and the place. At the beginning, it should be "-" (waiting for user location) and when user location is updated, it should be "450m" for example.

I thought to adding observer to each cells and post notification, but i feel like there is a best way to do it.

Était-ce utile?

La solution

try to get indexpath value of that cell and relaod that particuler cell .

 NSIndexPath* rowToReload = [NSIndexPath indexPathForRow:indexValue inSection:0];
 NSArray* rowsToReload = [NSArray arrayWithObjects:rowToReload, nil];
[self.favoritesTableView reloadRowsAtIndexPaths:rowsToReload withRowAnimation:UITableViewRowAnimationNone];
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top