Instance Method


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


- (void)willTransitionToState:(UITableViewCellStateMask)state;



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. The custom cell can set up and position any new views that appear with the new state. The cell then receives a layoutSubviews message (UIView) in which it can position these new views in their final locations for the new state. 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 UITableViewCellStateShowingDeleteConfirmationMask constant but the UITableViewCellStateShowingEditControlMask is not set.

See Also

Adjusting to State Transitions

- didTransitionToState:

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


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