How can we know how to reuse cells in advance? The prepareforreuse header file of cell rewriting is described in. if the currently allocated cell is reused (usually scrolling out of the screen), the cell prepareforreuse will be called to notify the cell. note that when you override the method here, you must call the parent class method [Super prepareforreuse]. pay special attention to this when using cell as the proxy container for network access. You need to cancel the previous network request here. do not send data to this cell.
// If the cell is reusable (has a reuse identifier), this is called just before the cell is returned from the table view method dequeuereusablecellwithidentifier:. If you override, you must call super.
-(Void) prepareforreuse
{
[Super prepareforreuse];
}
Many methods of customizing uitableviewcell have found that some people may encounter image disorder in their defined cells. This problem is often caused by the absence of the prepareforreuse method.
Uitableviewcell is used when scrolling down. The cell used is the one that slides out, the information displayed in the sliding cell appears here. The solution is to implement the perpareforreuse method in the subclass of uitableviewcell and clear the content.