Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Leaving swipe to delete button open on uitableview cell then going back causes crash

I have swipe to delete on one of my table cells. If I swipe right on the table cell to display the delete button and pop the view by pressing the back button the app crashes with Thread 1: EXC_BAD_ACCESS. I've already singled this out as the reason it crashes. Why does this happen?

This is what it looks like when I tap back https://www.dropbox.com/s/ggn4jqr0ox0tnta/Screenshot%202014-12-04%2023.39.25.png?dl=0

like image 418
Matthew Hui Avatar asked Dec 05 '14 07:12

Matthew Hui


1 Answers

Set UITableview end editing to NO in viewWillDisappear

[tableview setEditing:NO];
like image 137
NANNAV Avatar answered Oct 17 '22 01:10

NANNAV