Created
June 20, 2014 14:59
-
-
Save mikeabdullah/37bc493db7686fac5764 to your computer and use it in GitHub Desktop.
Loading toolbar items for editing mode from storyboard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (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