I have a view controller that I am trying to push on the navigation stack. I create a controller with a local variable, configure it, and then assign a property to it. Then, if I free the variable, I get EXE_BAD_ACCESS. if I save (or auto-vacation), it flows.
CustomTVC* controller = [[CustomTVC alloc]initWithStyle:UITableViewStyleGrouped]; controller.managedObjectContext = self.managedObjectContext; self.tableViewControllerIvar = controller; [self.navigationController pushViewController:self.tableViewControllerIvar animated:YES];
This is what happens if I release
- The above code is triggered by clicking the add button in the navigation bar.
- the view is clicked and everything is in order. In the new view, I can repeatedly increase the number of views without problems ... if
- Back to the root view of the navigation stack. (This is the code from which the code is called).
- Now, if I turn around again to the second view, try clicking another one that works.
Edit: I have a feeling that something is wrong when I push the third controller onto the stack. Using push, it inserts a new object into the context of the managed object, which causes the fetchedresultscontroller to update the table view. There may be a broken pointer. I will play with him and publish the results. -
Edit: 5/16
Getting this error message in the log
* - [CustomTVC controllerWillChangeContent:]: message sent to the freed instance 0x187270
This only happens after I pulled CustomTVC from the stack (return to the root navigation view controller). I can click and save everything I want until I use CustomTVC.
source share