I know that a subclass of UITableViewCell
can implement willTransitionToState
and execute custom code at the time of transition. But is there any way t
The swift version of jhilgert00 with Neil's comment applied:
override func willTransitionToState(state: UITableViewCellStateMask) {
super.willTransitionToState(state)
if (state == UITableViewCellStateMask.DefaultMask) {
println("default")
} else if (state & UITableViewCellStateMask.ShowingEditControlMask != nil)
&& (state & UITableViewCellStateMask.ShowingDeleteConfirmationMask != nil) {
println("Edit Control + Delete Button")
} else if state & UITableViewCellStateMask.ShowingEditControlMask != nil {
println("Edit Control Only")
} else if state & UITableViewCellStateMask.ShowingDeleteConfirmationMask != nil {
println("Swipe to Delete [Delete] button only")
}
}