Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Loading toolbar items for editing mode from storyboard
- (void)viewDidLoad {
[super viewDidLoad];
_stashedToolbarItemsForEditingMode = self.toolbarItems;
}
- (void)setEditing:(BOOL)editing animated:(BOOL)animated {
[super setEditing:editing animated:animated];
if (editing) {
self.toolbarItems = _stashedToolbarItemsForEditingMode;
}
else {
self.toolbarItems = self.navigationController.toolbarItems;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment