現在の状態は、UITableViewCellStateDefaultMask(0)、UITableViewCellStateShowingEditControlMask(1)、UITableViewCellStateShowingDeleteConfirmationMask(2)、およびUITableViewCellStateShowingEditControlMask | UITableViewCellStateShowingDeleteConfirmationMask(3)です。
これらの状態は、プロパティeditingとの値に対応しますshowingDeleteConfirmation。次のようにテストできます。
if (!cell.editing && !cell.showingDeleteConfirmation) {
// 0 - UITableViewCellStateDefaultMask
} else if (cell.editing && !cell.showingDeleteConfirmation) {
// 1 - UITableViewCellStateShowingEditControlMask
} else if (!cell.editing && cell.showingDeleteConfirmation) {
// 2 - UITableViewCellStateShowingDeleteConfirmationMask
} else if (cell.editing && cell.showingDeleteConfirmation) {
// 3 - UITableViewCellStateShowingEditControlMask | UITableViewCellStateShowingDeleteConfirmationMask
}