I have a tableView that allows deletion by swiping a cell or entering edit mode via an "Edit" button. The problem is, I'm not sure how to properly enable/disable edit mode; it should be disabled as soon as a user begins to swipe a row, and enabled after "unswiping" a row.
Currently, I disable in editingStyleForRowAtIndexPath (which returns delete) and enable in didEndEditingRowAtIndexPath.
The problem is, what if the user doesn't finish their swipe? For example, they begin to swipe a row, but release before fully swiping (causing the row to bounce back and hide the delete button). In this case, didEndEditingRowAtIndexPath does not get called. How do I ensure the table is editable after a half-swipe?