Edytuj

Udostępnij za pośrednictwem


UITableViewCell.SetHighlighted(Boolean, Boolean) Method

Definition

Sets the highlighted state of the cell, optionally animating the transition between states.

[Foundation.Export("setHighlighted:animated:")]
public virtual void SetHighlighted (bool highlighted, bool animated);
abstract member SetHighlighted : bool * bool -> unit
override this.SetHighlighted : bool * bool -> unit

Parameters

highlighted
Boolean

true to highlight the cell, false to unhighlight.

animated
Boolean

true to animate the highlight transition, false to make the transition immediate.

Attributes

Remarks

Highlights or unhighlights the cell, animating the transition if animated is true. Highlighting changes the appearance of the cell's labels, image, and background.

For highlighting to work properly, set the HighlightedTextColor for the two labels (TextLabel and DetailTextLabel), and set the HighlightedImage property on the cell's ImageView.

Custom cells can override this method to make additional changes when transitioning between states.

Applies to