UITableView tableView didEndDisplayingCell forRowAtIndexPath
- (void)tableView:(UITableView *)tableView didEndDisplayingCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
Parameters of [UITableView tableView didEndDisplayingCell forRowAtIndexPath]
tableView
The table-view object that removed the view.
cell
The cell that was removed.
indexPath
The index path of the cell.
Discussion of [UITableView tableView didEndDisplayingCell forRowAtIndexPath]
Use this method to detect when a cell is removed from a table view, as opposed to monitoring the view itself to see when it appears or disappears.
UITableView tableView didEndDisplayingCell forRowAtIndexPath example.
in iOS 6, use didEndDisplayingCell. Thus, it might look like:
- (void)tableView:(UITableView *)tableView didEndDisplayingCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
Movie *movie = self.movies[indexPath.row];
if ([movie isDownloading])
[movie cancelDownload];
}
- (void)tableView:(UITableView *)tableView didEndDisplayingCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
Movie *movie = self.movies[indexPath.row];
if ([movie isDownloading])
[movie cancelDownload];
}
Example of [UITableView tableView didEndDisplayingCell forRowAtIndexPath].
-(void)tableView:(UITableView )tableView didEndDisplayingCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath)indexPath{
[NSNotificationCenter defaultCenter];
[notificationCenter postNotificationName:@"Table Reloaded" object:nil];
}
[NSNotificationCenter defaultCenter];
[notificationCenter postNotificationName:@"Table Reloaded" object:nil];
}