0

In my app, you can slide to delete a row as done here. After sliding, an alert pops up confirming the deletion. If you cancel it, I'd like to slide the row over so that the delete button is no longer visible. Right now I'm doing the following, but there's got to be a better way that looks more fluid.

self.tableView.reloadRowsAtIndexPaths([indexPath], withRowAnimation:UITableViewRowAnimation.Right)
Pratik Jamariya
  • 810
  • 1
  • 10
  • 35
Dehli
  • 5,950
  • 5
  • 29
  • 44

1 Answers1

1

disable edit mode on the tableView


objC: self.tableView.editing = NO;

swift: self.tableView.editing = false

Daij-Djan
  • 49,552
  • 17
  • 113
  • 135
  • 1
    This solution is only useful if the table wasn't in edit mode and the user did a "swipe-to-delete". This isn't appropriate if the table was in edit mode and the user tapped the red circle icon. – rmaddy Jul 20 '14 at 21:17
  • during edit mode there is no swipe (maybe in custom controls, but no per default) = as the question was about swiping... – Daij-Djan Jul 20 '14 at 21:42
  • I understand that. I was simply adding a note for any future readers in case they were looking for a solution that worked in general. – rmaddy Jul 20 '14 at 21:46