29 12 | I have a viewController with a - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { return YES; } However, if I have a delete button revealed, and at the same time I use back navigation of my [ViewController tableView:canEditRowAtIndexPath:]: message sent to deallocated instance 0xaae64d0 How can I resolve this problem? |
57accepted | In your view controller's | ||||||||||||||||||||||||||||||||
|
35 | I had the same problem, but I was using ARC and I didn't want to be mucking about in the dealloc method. Doing it in viewWillDisappear was sufficient to stop the crash. - (void)viewWillDisappear:(BOOL)animated { [super viewWillDisappear:animated]; [table setEditing:NO]; } | ||||||||||||||||||||||||||||||
|