From ac3c854dc494a0e15e8b47304ca4ee89b31f528a Mon Sep 17 00:00:00 2001 From: Wenyu Zhang Date: Thu, 27 Aug 2020 08:34:00 -0700 Subject: [PATCH] [BottomNavigation] Align barItemsBottomAnchor with safeAreaInsets. PiperOrigin-RevId: 328742149 --- .../examples/BottomNavigationTypicalUseExample.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/BottomNavigation/examples/BottomNavigationTypicalUseExample.m b/components/BottomNavigation/examples/BottomNavigationTypicalUseExample.m index f47b72f8b8e..c71da022951 100644 --- a/components/BottomNavigation/examples/BottomNavigationTypicalUseExample.m +++ b/components/BottomNavigation/examples/BottomNavigationTypicalUseExample.m @@ -82,6 +82,11 @@ - (void)commonBottomNavigationTypicalUseExampleViewDidLoad { #endif // MDC_AVAILABLE_SDK_IOS(10_0) self.bottomNavBar.items = @[ tabBarItem1, tabBarItem2, tabBarItem3, tabBarItem4, tabBarItem5 ]; self.bottomNavBar.selectedItem = tabBarItem2; + if (@available(iOS 11.0, *)) { + [self.bottomNavBar.barItemsBottomAnchor + constraintEqualToAnchor:self.view.safeAreaLayoutGuide.bottomAnchor] + .active = YES; + } self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"+Message"