Commit daa2033a authored by Felix Paul Kühne's avatar Felix Paul Kühne

library: don't allow layout changes while editing (closes #14635)

(cherry picked from commit 0027161e)
parent 1b258d47
...@@ -1147,6 +1147,14 @@ static NSString *kUsingTableViewToShowData = @"UsingTableViewToShowData"; ...@@ -1147,6 +1147,14 @@ static NSString *kUsingTableViewToShowData = @"UsingTableViewToShowData";
} }
self.navigationController.toolbarHidden = !editing; self.navigationController.toolbarHidden = !editing;
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
NSMutableArray *rightBarButtonItems = [self.navigationItem.rightBarButtonItems mutableCopy];
UIBarButtonItem *toggleDisplayedView = rightBarButtonItems[0];
toggleDisplayedView.enabled = !editing;
rightBarButtonItems[0] = toggleDisplayedView;
self.navigationItem.rightBarButtonItems = rightBarButtonItems;
}
} }
- (void)toggleDisplayedView:(UIBarButtonItem *)button - (void)toggleDisplayedView:(UIBarButtonItem *)button
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment