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
Starting from swift 3 the value of state is an OptionSet, you can use it like this:
override func willTransitionToState(state: UITableViewCellStateMask) {
super.willTransitionToState(state)
if state.contains(.DefaultMask) {
print("DefaultMask")
}
if state.contains(.ShowingEditControlMask) {
print("ShowingEditControlMask")
}
}