You may want to deleteSections:withRowAnimation: when the table goes into edit mode and insertSections:withRowAnimation: when it stops editing.
It will also require changes to other dataSource methods to return the corresponding values, as if there was only one section when self.tableView.editing == YES .
source share