UITableViewCell.WillTransitionToState(UITableViewCellState) Method

Definition

Called on the cell just before it transitions between states.

[Foundation.Export("willTransitionToState:")]
public virtual void WillTransitionToState (UIKit.UITableViewCellState mask);
abstract member WillTransitionToState : UIKit.UITableViewCellState -> unit
override this.WillTransitionToState : UIKit.UITableViewCellState -> unit

Parameters

mask
UITableViewCellState

A bit mask indicating the state/s the cell is transitioning to.

Attributes

Remarks

UITableViewCell subclasses can implement this method to perform additional animations when it is changing state (such as from a normal state to editing move). A custom cell may create any new views that are required in the new state. LayoutSubviews() is then called which allows the code to position these new elements in their correct locations for the new state.

Subclasses must always call base when overriding this method.

Note that when the user swipes to delete, the cell transitions to the ShowingDeleteConfirmationMask - but ShowingEditControlMask is not set. Remember to test for the correct value when handling this case.

Applies to