Skip to content

Commit

Permalink
[BottomNavigation] Align barItemsBottomAnchor with safeAreaInsets.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 328742149
  • Loading branch information
Wenyu Zhang authored and material-automation committed Aug 27, 2020
1 parent 378fab1 commit ac3c854
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit ac3c854

Please sign in to comment.