Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(415)

Unified Diff: ios/clean/chrome/browser/ui/toolbar/toolbar_view_controller.mm

Issue 2869903002: [ios clean] Dismisses ToolsMenu on Layout changes. (Closed)
Patch Set: Uses viewWillTransitionToSize Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/clean/chrome/browser/ui/tab_grid/tab_grid_view_controller.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/clean/chrome/browser/ui/toolbar/toolbar_view_controller.mm
diff --git a/ios/clean/chrome/browser/ui/toolbar/toolbar_view_controller.mm b/ios/clean/chrome/browser/ui/toolbar/toolbar_view_controller.mm
index 48003841e5e842087ebc234347379bafe143ab22..038bf9d2a9724b0e1cf2d82a251a31965bbc6b5d 100644
--- a/ios/clean/chrome/browser/ui/toolbar/toolbar_view_controller.mm
+++ b/ios/clean/chrome/browser/ui/toolbar/toolbar_view_controller.mm
@@ -59,6 +59,8 @@ CGFloat kHorizontalMargin = 8.0f;
return self;
}
+#pragma mark - View lifecyle
+
- (void)viewDidLoad {
self.view.backgroundColor = [UIColor lightGrayColor];
@@ -94,6 +96,14 @@ CGFloat kHorizontalMargin = 8.0f;
]];
}
+- (void)viewWillTransitionToSize:(CGSize)size
+ withTransitionCoordinator:
+ (id<UIViewControllerTransitionCoordinator>)coordinator {
+ // We need to dismiss the ToolsMenu everytime the Toolbar frame changes
+ // (e.g. Size changes, rotation changes, etc.)
+ [self.dispatcher closeToolsMenu];
+}
+
#pragma mark - Components Setup
- (void)setUpToolbarButtons {
« no previous file with comments | « ios/clean/chrome/browser/ui/tab_grid/tab_grid_view_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698