| ### Theming |
| |
| `MDCBottomNavigation` supports Material Theming using a Container Scheme. |
| There are two variants for Material Theming of a BottomNavigation. The Surface Variant colors the App Bar |
| background to be `surfaceColor` and the Primary Variant colors the App Bar background to be |
| `primaryColor`. |
| |
| <!--<div class="material-code-render" markdown="1">--> |
| |
| #### Swift |
| |
| ```swift |
| // Import the BottomNavigation Theming Extensions module |
| import MaterialComponents.MaterialBottomNavigation_Theming |
| |
| ... |
| |
| // Apply your app's Container Scheme to the App Bar controller |
| let containerScheme = MDCContainerScheme() |
| |
| // Either Primary Theme |
| bottomNavigation.applyPrimaryTheme(withScheme: containerScheme) |
| |
| // Or Surface Theme |
| bottomNavigation.applySurfaceTheme(withScheme: containerScheme) |
| ``` |
| |
| #### Objective-C |
| |
| ```objc |
| // Import the BottomNavigation Theming Extensions header |
| #import "MaterialBottomNavigation+Theming.h" |
| |
| ... |
| |
| // Apply your app's Container Scheme to the App Bar controller |
| MDCContainerScheme *containerScheme = [[MDCContainerScheme alloc] init]; |
| |
| // Either Primary Theme |
| [self.bottomNavigation applyPrimaryThemeWithScheme:containerScheme]; |
| |
| // Or Surface Theme |
| [self.bottomNavigation applySurfaceThemeWithScheme:containerScheme]; |
| ``` |
| |
| <!--</div>--> |