mirror of
https://github.com/material-components/material-components-ios.git
synced 2026-02-20 08:27:32 +08:00
This change fixes the broken links in MDCActionSheet and MDCAppBar components. This also moves the Themer documentation to an "unsupported" section.
1.1 KiB
1.1 KiB
Theming
You can theme an MDCActionSheet to match the Material Design style by using a theming extension. The content below assumes you have read the article on Theming.
First, create an action sheet and import the theming extension header for Action Sheets.
Swift
import MaterialComponents.MaterialActionSheet
import MaterialComponents.MaterialActionSheet_Theming
let actionSheet = MDCActionSheetController()
Objective-C
#import <MaterialComponents/MaterialActionSheet.h>
#import <MaterialComponents/MaterialActionSheet+Theming.h>
MDCActionSheetController *actionSheet = [[MDCActionSheetController alloc] init];
You can then provide a container scheme instance to any of the MDCActionSheet theming extensions.
Then, you can theme your action sheet.
Swift
actionSheet.applyTheme(withScheme: containerScheme)
Objective-C
[self.actionSheet applyThemeWithScheme:self.containerScheme];