There are cases where adding an MDCAppBarViewController as a child is not possible, most notably:
In such cases, using MDCAppBarContainerViewController is preferred. MDCAppBarContainerViewController is a simple container view controller that places a content view controller as a sibling to an MDCAppBarViewController.
Note: the trade off to using this API is that it will affect your view controller hierarchy. If the view controller makes any assumptions about its parent view controller or its navigationController properties then these assumptions may break once the view controller is wrapped.
You‘ll typically push the container view controller onto a navigation controller, in which case you will also hide the navigation controller’s navigation bar using UINavigationController's -setNavigationBarHidden:animated:.
let container = MDCAppBarContainerViewController(contentViewController: <#T##UIViewController#>)
MDCAppBarContainerViewController *container = [[MDCAppBarContainerViewController alloc] initWithContentViewController:<#(nonnull UIViewController *)#>];