In iOS 5, if I set allowsMultipleSelectionDuringEditing
to YES on a UITableView then swipe-to-delete no longer works. The built-in Mail app supports both swipe-to-d
The trick is to set allowsMultipleSelectionDuringEditing
to YES on entering edit mode and set it back to NO on exiting edit mode. This way, both swipe-to-delete and multiple selections in edit mode work.
If you've subclassed UITableViewController
(which you probably have), then you can simply do this:
- (void)setEditing:(BOOL)editing animated:(BOOL)animated
{
// Set allowsMultipleSelectionDuringEditing to YES only while
// editing. This gives us the golden combination of swipe-to-delete
// while out of edit mode and multiple selections while in it.
self.tableView.allowsMultipleSelectionDuringEditing = editing;
[super setEditing:editing animated:animated];
}