Detect when UITableViewCell goes out of scope

后端 未结 2 1993
终归单人心
终归单人心 2021-01-02 03:02

How can I detect when a UITableViewCell derived object gets removed from a table and into the cache?

2条回答
  •  离开以前
    2021-01-02 03:21

    after ios 6.0 you have the following method of UITableViewDelegate

    - (void)tableView:(UITableView *)tableView didEndDisplayingCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
    
    
    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.
    

提交回复
热议问题