Skip to content

Commit

Permalink
[Snackbar] Remove references to deprecated static MDCSnackbarManager …
Browse files Browse the repository at this point in the history
…methods.

PiperOrigin-RevId: 331144968
  • Loading branch information
bryanoltman authored and material-automation committed Sep 11, 2020
1 parent 63670a7 commit 78868b5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions components/Snackbar/examples/SnackbarSimpleExample.m
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,11 @@ - (void)showColorThemedSnackbar:(id)sender {
- (void)showCustomizedSnackbar:(id)sender {
UIFont *customMessageFont = [UIFont fontWithName:@"Zapfino" size:14];
NSAssert(customMessageFont, @"Unable to instantiate font");
MDCSnackbarManager.messageFont = customMessageFont;
MDCSnackbarManager.defaultManager.messageFont = customMessageFont;

UIFont *customButtonFont = [UIFont fontWithName:@"ChalkDuster" size:14];
NSAssert(customButtonFont, @"Unable to instantiate font");
MDCSnackbarManager.buttonFont = customButtonFont;
MDCSnackbarManager.defaultManager.buttonFont = customButtonFont;

MDCSnackbarMessage *message = [[MDCSnackbarMessage alloc] init];
message.text = @"Customized Fonts";
Expand All @@ -167,8 +167,8 @@ - (void)showCustomizedSnackbar:(id)sender {
}

- (void)showDecustomizedSnackbar:(id)sender {
MDCSnackbarManager.messageFont = nil;
MDCSnackbarManager.buttonFont = nil;
MDCSnackbarManager.defaultManager.messageFont = nil;
MDCSnackbarManager.defaultManager.buttonFont = nil;
[MDCSnackbarManager.defaultManager setButtonTitleColor:nil forState:UIControlStateNormal];
[MDCSnackbarManager.defaultManager setButtonTitleColor:nil forState:UIControlStateHighlighted];
MDCSnackbarManager.defaultManager.messageTextColor = nil;
Expand Down

0 comments on commit 78868b5

Please sign in to comment.