I have a tablew view in which I would like to have two different tableFooterViews, depending on the edit-mode.
In the contructor I create and assign the following views:
Code:
self.tableFooterView = ...
self.tableFooterViewEdit = ...
In the setEditing-method I wanted to toggle the tableFooterView of the table view:
Code:
- (void)setEditing:(BOOL)editing animated:(BOOL)animated {
[super setEditing:editing animated:animated];
if (self.editing) {
self.tableView.tableFooterView = self.tableFooterViewEdit;
} else {
self.tableView.tableFooterView = self.tableFooterView;
}
...
}
Now, when testing this in the simulator the app crashes when going into the edit-mode (EXC_BAD_ACCESS). I checked the two views, both work fine when not toggling.
Even if one of the both views is nil, it does not work. For me, it seems like the tableFooterView cannot be re-assigned (not even to nil)!? What am I missing?
Thanks