Commit 34f8b260 authored by Chris Lu's avatar Chris Lu Committed by Commit Bot

[ios] Ensure MDCAppBarViewController matches the width of StaticFileViewController.

Late addition to the docs: https://github.com/material-components/material-components-ios/tree/develop/components/AppBar#migration-guide-mdcappbar-to-mdcappbarviewcontroller

Bug: 874471
Change-Id: I370379e55e962695a8eabf609972ca5dc39bd211
Reviewed-on: https://chromium-review.googlesource.com/1239535Reviewed-by: default avatarKurt Horimoto <kkhorimoto@chromium.org>
Commit-Queue: Chris Lu <thegreenfrog@chromium.org>
Cr-Commit-Position: refs/heads/master@{#594019}
parent b32c8582
......@@ -83,6 +83,12 @@
// Add the app bar at the end.
[self addChildViewController:_appBarViewController];
// Match the width of the parent view.
CGRect frame = _appBarViewController.view.frame;
frame.origin.x = 0;
frame.size.width =
_appBarViewController.parentViewController.view.bounds.size.width;
_appBarViewController.view.frame = frame;
[self.view addSubview:_appBarViewController.view];
[_appBarViewController didMoveToParentViewController:self];
......
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