Instance Method


Called to notify the cell that it transitioned to a new cell state.


func didTransition(to state: UITableViewCell.StateMask)



A bit mask indicating the state or combination of states the cell is transitioning to.


Subclasses of UITableViewCell can implement this method to animate additional changes to a cell when it is changing state. UITableViewCell calls this method whenever a cell transitions between states, such as from a normal state (the default) to editing mode. This method is called at the end of the animation block, which gives the custom cell a chance to clean up after the state change—for example, removing the edit and reorder controls after transitioning out of editing. Subclasses must always call super when overriding this method.

Note that when the user swipes a cell to delete it, the cell transitions to the state identified by the showingDeleteConfirmation constant but the showingEditControl is not set.

See Also

Adjusting to State Transitions

func willTransition(to: UITableViewCell.StateMask)

Called to notify the cell that it is about to transition to a new cell state.

struct UITableViewCell.StateMask

Constants used to determine the new state of a cell as it transitions between states.