編集

次の方法で共有


UITableViewCell.PrepareForReuse Method

Definition

Prepares a cell for reuse by the table view's UITableViewSource.

[Foundation.Advice("Overriding this method requires a call to the overriden method.")]
[Foundation.Export("prepareForReuse")]
[ObjCRuntime.RequiresSuper]
public virtual void PrepareForReuse ();
abstract member PrepareForReuse : unit -> unit
override this.PrepareForReuse : unit -> unit
Attributes

Remarks

If a UITableView is reusable - it has a ReuseIdentifier - this method is called just before the object is returned by DequeueReusableCell(String). This method implementation should reset cell attributes that are not content-related, such as alpha, editing, and selection state. The GetCell(UITableView, NSIndexPath) should always reset the content when reusing a cell.

Subclasses must always call base when overriding this method.

If the cell object does not have a ReuseIdentifier, this method is not called.

Applies to