Skip to content

Commit

Permalink
[Snackbar] Don't force uppercasing of the button.
Browse files Browse the repository at this point in the history
Summary:
The snackbar button already handles the uppercasing. Remove the code in
Snackbar that uppercased the set title.

Closes https://github.com/google/material-components-ios/issues/618.

Test Plan:
Check the accessibility label of snackbar buttons in Catalog. It should not be
uppercased.

Reviewers: ajsecord, O1 Material components iOS, junius

Reviewed By: ajsecord, O1 Material components iOS, junius

Tags: #material_components_ios

Differential Revision: http://codereview.cc/D1123
  • Loading branch information
Arcank committed Jul 6, 2016
1 parent 53122b2 commit f9f6d8e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions components/Snackbar/src/private/MDCSnackbarMessageView.m
Expand Up @@ -364,13 +364,11 @@ - (instancetype)initWithMessage:(MDCSnackbarMessage *)message
[buttonView addSubview:button];

// Style the text in the button.
NSString *uppercaseButtonText =
[message.action.title uppercaseStringWithLocale:[NSLocale currentLocale]];
NSAttributedString *buttonText =
[[NSAttributedString alloc] initWithString:uppercaseButtonText
[[NSAttributedString alloc] initWithString:message.action.title
attributes:buttonAttributes];
NSAttributedString *buttonHighlightedText =
[[NSAttributedString alloc] initWithString:uppercaseButtonText
[[NSAttributedString alloc] initWithString:message.action.title
attributes:buttonHighlightedAttributes];
button.titleLabel.numberOfLines = 1;
button.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
Expand Down

0 comments on commit f9f6d8e

Please sign in to comment.