Leave a swipe to remove the button that is open on the uitableview cell, and then backwards causes a crash

I deleted to delete one of my table cells. If I swipe right in the table cell to display the delete button, and you open the window by clicking the back button, the application will exit with stream 1: EXC_BAD_ACCESS. I have already identified this as the reason for its failure. Why is this happening?

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

+6
source share
4 answers

Set UITableview end of editing to NO in viewWillDisappear

 [tableview setEditing:NO]; 
+12
source

Where do you remove your cell from the table view. You also need to delete data from the array.

0
source

When you are right, perhaps you are pushing the controller. As the view disappears, you must write NANNAV lines.

0
source

This is because the delegate and table data source is a simple destination pointer, not a weak one. Therefore, after removing the view controller that contains the table, you can send events to the controller. To avoid this, you can manually set the tableview and datasouce delegate to zero in the dealloc method. By the way, this happens not only with tables.

0
source

Source: https://habr.com/ru/post/979157/


All Articles