Skip to content

Instantly share code, notes, and snippets.

@mikeabdullah
Created June 20, 2014 14:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikeabdullah/37bc493db7686fac5764 to your computer and use it in GitHub Desktop.
Save mikeabdullah/37bc493db7686fac5764 to your computer and use it in GitHub Desktop.
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