diff --git a/CHANGELOG.md b/CHANGELOG.md index aaedeb086f5..9d26bcf9cf2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,55 @@ +# 22.0.0 + +## API diffs + +### Dialogs + +#### Changes + +* [Add Dynamic Type support to Alert controller (#1213)](https://github.com/material-components/material-components-ios/commit/9f92b161db6441dfa8b4eacf7dff6d8aced37509) (ianegordon) + +### Typography + +#### Changes + +* [Added bold and italics to the system fontloader and MDCTypographyFontLoader protocol (#1225)](https://github.com/material-components/material-components-ios/commit/975680a9cb34db366f4d95e62a105d7a0300b972) (Randall Li) + +## Component changes + +### AppBar + +#### Changes + +* [Fix analyzer warnings (#1229)](https://github.com/material-components/material-components-ios/commit/42084cb3b8fa4c9b7deef0120231ec1063a5397a) (ianegordon) + +### Buttons + +#### Changes + +* [Dynamic Type resizing fix (#1213)](https://github.com/material-components/material-components-ios/commit/9f92b161db6441dfa8b4eacf7dff6d8aced37509) (ianegordon) + +### Dialogs + +#### Changes + +* [Add Dynamic Type support to Alert controller (#1213)](https://github.com/material-components/material-components-ios/commit/9f92b161db6441dfa8b4eacf7dff6d8aced37509) (ianegordon) + +### Snackbar + +#### Changes + +* [fix case of UIKit.h (#1223)](https://github.com/material-components/material-components-ios/commit/3f2968b54c738c747c6b9a02ab614d7853b0c406) (yoshisatoyanagisawa) + +### Typography + +#### Changes + +* [Add warning about custom fonts and Dynamic Type (#1224)](https://github.com/material-components/material-components-ios/commit/9bea2218a6a6fa7d3eabf4788e4a49ff52487259) (ianegordon) +* [Added bold and italics to the system fontloader and MDCTypographyFontLoader protocol (#1225)](https://github.com/material-components/material-components-ios/commit/975680a9cb34db366f4d95e62a105d7a0300b972) (Randall Li) +* [Fix analyzer warnings (#1229)](https://github.com/material-components/material-components-ios/commit/42084cb3b8fa4c9b7deef0120231ec1063a5397a) (ianegordon) +* [switch it to a objc test (#1226)](https://github.com/material-components/material-components-ios/commit/64852237037ccd68af02b84e03f085392829ec5e) (Randall Li) + + # 21.3.0 ## API diffs diff --git a/MaterialComponents.podspec b/MaterialComponents.podspec index 1cfb6d03e36..8aeeb85a948 100644 --- a/MaterialComponents.podspec +++ b/MaterialComponents.podspec @@ -2,7 +2,7 @@ load 'scripts/generated/icons.rb' Pod::Spec.new do |s| s.name = "MaterialComponents" - s.version = "21.3.0" + s.version = "22.0.0" s.authors = "The Material Components authors." s.summary = "A collection of stand-alone production-ready UI libraries focused on design details." s.homepage = "https://github.com/material-components/material-components-ios" diff --git a/MaterialComponentsCatalog.podspec b/MaterialComponentsCatalog.podspec index 8d0b4c4895a..3011ca5bbdc 100644 --- a/MaterialComponentsCatalog.podspec +++ b/MaterialComponentsCatalog.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "MaterialComponentsCatalog" - s.version = "21.3.0" + s.version = "22.0.0" s.authors = "The Material Components authors." s.summary = "A collection of stand-alone production-ready UI libraries focused on design details." s.homepage = "https://github.com/material-components/material-components-ios" diff --git a/MaterialComponentsUnitTests.podspec b/MaterialComponentsUnitTests.podspec index 8df3920fa14..ea577ab40f7 100644 --- a/MaterialComponentsUnitTests.podspec +++ b/MaterialComponentsUnitTests.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "MaterialComponentsUnitTests" - s.version = "21.3.0" + s.version = "22.0.0" s.authors = "The Material Motion authors." s.summary = "A collection of stand-alone production-ready UI libraries focused on design details." s.homepage = "https://github.com/material-components/material-components-ios" diff --git a/catalog/Podfile.lock b/catalog/Podfile.lock index 018c04b489b..5ed6f98c4e0 100644 --- a/catalog/Podfile.lock +++ b/catalog/Podfile.lock @@ -1,37 +1,37 @@ PODS: - CatalogByConvention (2.0.0) - EarlGrey (1.7.1) - - MaterialComponents (21.3.0): - - MaterialComponents/ActivityIndicator (= 21.3.0) - - MaterialComponents/AnimationTiming (= 21.3.0) - - MaterialComponents/AppBar (= 21.3.0) - - MaterialComponents/ButtonBar (= 21.3.0) - - MaterialComponents/Buttons (= 21.3.0) - - MaterialComponents/CollectionCells (= 21.3.0) - - MaterialComponents/CollectionLayoutAttributes (= 21.3.0) - - MaterialComponents/Collections (= 21.3.0) - - MaterialComponents/Dialogs (= 21.3.0) - - MaterialComponents/FeatureHighlight (= 21.3.0) - - MaterialComponents/FlexibleHeader (= 21.3.0) - - MaterialComponents/HeaderStackView (= 21.3.0) - - MaterialComponents/Ink (= 21.3.0) - - MaterialComponents/NavigationBar (= 21.3.0) - - MaterialComponents/OverlayWindow (= 21.3.0) - - MaterialComponents/PageControl (= 21.3.0) - - MaterialComponents/Palettes (= 21.3.0) - - MaterialComponents/private (= 21.3.0) - - MaterialComponents/ProgressView (= 21.3.0) - - MaterialComponents/ShadowElevations (= 21.3.0) - - MaterialComponents/ShadowLayer (= 21.3.0) - - MaterialComponents/Slider (= 21.3.0) - - MaterialComponents/Snackbar (= 21.3.0) - - MaterialComponents/Tabs (= 21.3.0) - - MaterialComponents/Typography (= 21.3.0) - - MaterialComponents/ActivityIndicator (21.3.0): + - MaterialComponents (22.0.0): + - MaterialComponents/ActivityIndicator (= 22.0.0) + - MaterialComponents/AnimationTiming (= 22.0.0) + - MaterialComponents/AppBar (= 22.0.0) + - MaterialComponents/ButtonBar (= 22.0.0) + - MaterialComponents/Buttons (= 22.0.0) + - MaterialComponents/CollectionCells (= 22.0.0) + - MaterialComponents/CollectionLayoutAttributes (= 22.0.0) + - MaterialComponents/Collections (= 22.0.0) + - MaterialComponents/Dialogs (= 22.0.0) + - MaterialComponents/FeatureHighlight (= 22.0.0) + - MaterialComponents/FlexibleHeader (= 22.0.0) + - MaterialComponents/HeaderStackView (= 22.0.0) + - MaterialComponents/Ink (= 22.0.0) + - MaterialComponents/NavigationBar (= 22.0.0) + - MaterialComponents/OverlayWindow (= 22.0.0) + - MaterialComponents/PageControl (= 22.0.0) + - MaterialComponents/Palettes (= 22.0.0) + - MaterialComponents/private (= 22.0.0) + - MaterialComponents/ProgressView (= 22.0.0) + - MaterialComponents/ShadowElevations (= 22.0.0) + - MaterialComponents/ShadowLayer (= 22.0.0) + - MaterialComponents/Slider (= 22.0.0) + - MaterialComponents/Snackbar (= 22.0.0) + - MaterialComponents/Tabs (= 22.0.0) + - MaterialComponents/Typography (= 22.0.0) + - MaterialComponents/ActivityIndicator (22.0.0): - MaterialComponents/private/Application - MaterialComponents/private/RTL - - MaterialComponents/AnimationTiming (21.3.0) - - MaterialComponents/AppBar (21.3.0): + - MaterialComponents/AnimationTiming (22.0.0) + - MaterialComponents/AppBar (22.0.0): - MaterialComponents/FlexibleHeader - MaterialComponents/HeaderStackView - MaterialComponents/NavigationBar @@ -40,16 +40,16 @@ PODS: - MaterialComponents/ShadowElevations - MaterialComponents/ShadowLayer - MaterialComponents/Typography - - MaterialComponents/ButtonBar (21.3.0): + - MaterialComponents/ButtonBar (22.0.0): - MaterialComponents/Buttons - MaterialComponents/private/RTL - - MaterialComponents/Buttons (21.3.0): + - MaterialComponents/Buttons (22.0.0): - MaterialComponents/Ink - MaterialComponents/ShadowElevations - MaterialComponents/ShadowLayer - MaterialComponents/Typography - MDFTextAccessibility - - MaterialComponents/CollectionCells (21.3.0): + - MaterialComponents/CollectionCells (22.0.0): - MaterialComponents/CollectionLayoutAttributes - MaterialComponents/Ink - MaterialComponents/private/Icons/ic_check @@ -60,86 +60,86 @@ PODS: - MaterialComponents/private/Icons/ic_reorder - MaterialComponents/private/RTL - MaterialComponents/Typography - - MaterialComponents/CollectionLayoutAttributes (21.3.0) - - MaterialComponents/Collections (21.3.0): + - MaterialComponents/CollectionLayoutAttributes (22.0.0) + - MaterialComponents/Collections (22.0.0): - MaterialComponents/CollectionCells - MaterialComponents/CollectionLayoutAttributes - MaterialComponents/Ink - MaterialComponents/ShadowElevations - MaterialComponents/ShadowLayer - MaterialComponents/Typography - - MaterialComponents/Dialogs (21.3.0): + - MaterialComponents/Dialogs (22.0.0): - MaterialComponents/Buttons - MaterialComponents/private/KeyboardWatcher - MaterialComponents/private/RTL - MaterialComponents/ShadowElevations - MaterialComponents/ShadowLayer - - MaterialComponents/FeatureHighlight (21.3.0): + - MaterialComponents/FeatureHighlight (22.0.0): - MaterialComponents/Typography - MDFTextAccessibility - - MaterialComponents/FlexibleHeader (21.3.0): + - MaterialComponents/FlexibleHeader (22.0.0): - MaterialComponents/private/Application - MDFTextAccessibility - - MaterialComponents/HeaderStackView (21.3.0) - - MaterialComponents/Ink (21.3.0) - - MaterialComponents/NavigationBar (21.3.0): + - MaterialComponents/HeaderStackView (22.0.0) + - MaterialComponents/Ink (22.0.0) + - MaterialComponents/NavigationBar (22.0.0): - MaterialComponents/ButtonBar - MaterialComponents/private/RTL - MaterialComponents/Typography - MDFTextAccessibility - - MaterialComponents/OverlayWindow (21.3.0): + - MaterialComponents/OverlayWindow (22.0.0): - MaterialComponents/private/Application - - MaterialComponents/PageControl (21.3.0) - - MaterialComponents/Palettes (21.3.0) - - MaterialComponents/private (21.3.0): - - MaterialComponents/private/Application (= 21.3.0) - - MaterialComponents/private/Icons (= 21.3.0) - - MaterialComponents/private/KeyboardWatcher (= 21.3.0) - - MaterialComponents/private/Overlay (= 21.3.0) - - MaterialComponents/private/RTL (= 21.3.0) - - MaterialComponents/private/ThumbTrack (= 21.3.0) - - MaterialComponents/private/Application (21.3.0) - - MaterialComponents/private/Icons (21.3.0): - - MaterialComponents/private/Icons/Base (= 21.3.0) - - MaterialComponents/private/Icons/ic_arrow_back (= 21.3.0) - - MaterialComponents/private/Icons/ic_check (= 21.3.0) - - MaterialComponents/private/Icons/ic_check_circle (= 21.3.0) - - MaterialComponents/private/Icons/ic_chevron_right (= 21.3.0) - - MaterialComponents/private/Icons/ic_info (= 21.3.0) - - MaterialComponents/private/Icons/ic_radio_button_unchecked (= 21.3.0) - - MaterialComponents/private/Icons/ic_reorder (= 21.3.0) - - MaterialComponents/private/Icons/Base (21.3.0) - - MaterialComponents/private/Icons/ic_arrow_back (21.3.0): + - MaterialComponents/PageControl (22.0.0) + - MaterialComponents/Palettes (22.0.0) + - MaterialComponents/private (22.0.0): + - MaterialComponents/private/Application (= 22.0.0) + - MaterialComponents/private/Icons (= 22.0.0) + - MaterialComponents/private/KeyboardWatcher (= 22.0.0) + - MaterialComponents/private/Overlay (= 22.0.0) + - MaterialComponents/private/RTL (= 22.0.0) + - MaterialComponents/private/ThumbTrack (= 22.0.0) + - MaterialComponents/private/Application (22.0.0) + - MaterialComponents/private/Icons (22.0.0): + - MaterialComponents/private/Icons/Base (= 22.0.0) + - MaterialComponents/private/Icons/ic_arrow_back (= 22.0.0) + - MaterialComponents/private/Icons/ic_check (= 22.0.0) + - MaterialComponents/private/Icons/ic_check_circle (= 22.0.0) + - MaterialComponents/private/Icons/ic_chevron_right (= 22.0.0) + - MaterialComponents/private/Icons/ic_info (= 22.0.0) + - MaterialComponents/private/Icons/ic_radio_button_unchecked (= 22.0.0) + - MaterialComponents/private/Icons/ic_reorder (= 22.0.0) + - MaterialComponents/private/Icons/Base (22.0.0) + - MaterialComponents/private/Icons/ic_arrow_back (22.0.0): - MaterialComponents/private/Icons/Base - - MaterialComponents/private/Icons/ic_check (21.3.0): + - MaterialComponents/private/Icons/ic_check (22.0.0): - MaterialComponents/private/Icons/Base - - MaterialComponents/private/Icons/ic_check_circle (21.3.0): + - MaterialComponents/private/Icons/ic_check_circle (22.0.0): - MaterialComponents/private/Icons/Base - - MaterialComponents/private/Icons/ic_chevron_right (21.3.0): + - MaterialComponents/private/Icons/ic_chevron_right (22.0.0): - MaterialComponents/private/Icons/Base - - MaterialComponents/private/Icons/ic_info (21.3.0): + - MaterialComponents/private/Icons/ic_info (22.0.0): - MaterialComponents/private/Icons/Base - - MaterialComponents/private/Icons/ic_radio_button_unchecked (21.3.0): + - MaterialComponents/private/Icons/ic_radio_button_unchecked (22.0.0): - MaterialComponents/private/Icons/Base - - MaterialComponents/private/Icons/ic_reorder (21.3.0): + - MaterialComponents/private/Icons/ic_reorder (22.0.0): - MaterialComponents/private/Icons/Base - - MaterialComponents/private/KeyboardWatcher (21.3.0): + - MaterialComponents/private/KeyboardWatcher (22.0.0): - MaterialComponents/private/Application - - MaterialComponents/private/Overlay (21.3.0) - - MaterialComponents/private/RTL (21.3.0) - - MaterialComponents/private/ThumbTrack (21.3.0): + - MaterialComponents/private/Overlay (22.0.0) + - MaterialComponents/private/RTL (22.0.0) + - MaterialComponents/private/ThumbTrack (22.0.0): - MaterialComponents/Ink - MaterialComponents/private/RTL - MaterialComponents/ShadowElevations - MaterialComponents/ShadowLayer - MaterialComponents/Typography - - MaterialComponents/ProgressView (21.3.0): + - MaterialComponents/ProgressView (22.0.0): - MaterialComponents/private/RTL - - MaterialComponents/ShadowElevations (21.3.0) - - MaterialComponents/ShadowLayer (21.3.0) - - MaterialComponents/Slider (21.3.0): + - MaterialComponents/ShadowElevations (22.0.0) + - MaterialComponents/ShadowLayer (22.0.0) + - MaterialComponents/Slider (22.0.0): - MaterialComponents/private/ThumbTrack - - MaterialComponents/Snackbar (21.3.0): + - MaterialComponents/Snackbar (22.0.0): - MaterialComponents/AnimationTiming - MaterialComponents/Buttons - MaterialComponents/OverlayWindow @@ -147,16 +147,16 @@ PODS: - MaterialComponents/private/KeyboardWatcher - MaterialComponents/private/Overlay - MaterialComponents/Typography - - MaterialComponents/Tabs (21.3.0): + - MaterialComponents/Tabs (22.0.0): - MaterialComponents/AnimationTiming - MaterialComponents/Ink - MaterialComponents/private/RTL - MaterialComponents/Typography - - MaterialComponents/Typography (21.3.0): + - MaterialComponents/Typography (22.0.0): - MaterialComponents/private/Application - - MaterialComponentsCatalog (21.3.0): + - MaterialComponentsCatalog (22.0.0): - MaterialComponents - - MaterialComponentsUnitTests (21.3.0): + - MaterialComponentsUnitTests (22.0.0): - MaterialComponents - MDFTextAccessibility - MDFTextAccessibility (1.1.4) @@ -179,9 +179,9 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: CatalogByConvention: be55c2263132e4f9f59299ac8a528ee8715b3275 EarlGrey: 4ee729245614b7157aafa7fa4a8c4fd4ba38113a - MaterialComponents: 2ac12e2696035b4fd9b39d8bda4221a5bf701b2b - MaterialComponentsCatalog: fca2048b526aa3867182dedfcd06f987268177e4 - MaterialComponentsUnitTests: 8d1b32b05fb9b024fb935831f0637f4845bd839f + MaterialComponents: 5b9fb963ed4fa4c5d7a337cc6867c5ba65d8d324 + MaterialComponentsCatalog: 6466cef1a09b51d3841256b674943efd023337c0 + MaterialComponentsUnitTests: 9b2c86b559061809f4d0685d5185208816845dfd MDFTextAccessibility: aa897b2675bc614c01a331053af680deea692148 PODFILE CHECKSUM: 0a93a34ae9af89654baaaa3a998126cb7d9e1198 diff --git a/components/AppBar/examples/AppBarModalPresentationExample.m b/components/AppBar/examples/AppBarModalPresentationExample.m index b7eac189021..c75809274c1 100644 --- a/components/AppBar/examples/AppBarModalPresentationExample.m +++ b/components/AppBar/examples/AppBarModalPresentationExample.m @@ -53,6 +53,7 @@ - (instancetype)init { } - (void)viewDidLoad { + [super viewDidLoad]; // UITableViewController's tableView.delegate is self by default. We're setting it here for // emphasis. diff --git a/components/Buttons/src/MDCButton.m b/components/Buttons/src/MDCButton.m index 91fa0743806..ec37444bf5b 100644 --- a/components/Buttons/src/MDCButton.m +++ b/components/Buttons/src/MDCButton.m @@ -705,6 +705,7 @@ - (void)mdc_setAdjustsFontForContentSizeCategory:(BOOL)adjusts { - (void)contentSizeCategoryDidChange:(NSNotification *)notification { UIFont *font = [UIFont mdc_preferredFontForMaterialTextStyle:MDCFontTextStyleButton]; self.titleLabel.font = font; + [self sizeToFit]; } #pragma mark - Deprecations diff --git a/components/Dialogs/examples/DialogsAlertViewController.m b/components/Dialogs/examples/DialogsAlertViewController.m index d2ca26490e0..71b00a309c0 100644 --- a/components/Dialogs/examples/DialogsAlertViewController.m +++ b/components/Dialogs/examples/DialogsAlertViewController.m @@ -81,11 +81,11 @@ - (IBAction)didTapNondismissingAlert:(id)sender { MDCAlertController *materialAlertController = [MDCAlertController alertControllerWithTitle:titleString message:messageString]; - MDCAlertAction *agreeAaction = [MDCAlertAction actionWithTitle:@"AGREE" + MDCAlertAction *agreeAction = [MDCAlertAction actionWithTitle:@"AGREE" handler:^(MDCAlertAction *action) { NSLog(@"%@", @"AGREE pressed"); }]; - [materialAlertController addAction:agreeAaction]; + [materialAlertController addAction:agreeAction]; MDCAlertAction *disagreeAaction = [MDCAlertAction actionWithTitle:@"DISAGREE" handler:^(MDCAlertAction *action) { @@ -101,4 +101,39 @@ - (IBAction)didTapNondismissingAlert:(id)sender { [self presentViewController:materialAlertController animated:YES completion:NULL]; } +- (IBAction)didTapDynamicAlert:(id)sender { + // The following strings are extra verbose to better demonstrate the dynamic handling of an alert. + NSString *titleString = @"This alert supports Dynamic Type font sizing."; + NSString *messageString = + @"You can adjust to size of the font used in the Settings App. Navigate to General -> " + "Accessibility -> Larger Text. Yout can drag the slider left and right to adjust the size " + "of your fonts to be larger or smaller. We will update the fonts used in this alert to " + "match your preference"; + + MDCAlertController *materialAlertController = + [MDCAlertController alertControllerWithTitle:titleString message:messageString]; + materialAlertController.mdc_adjustsFontForContentSizeCategory = YES; + + MDCAlertAction *agreeAction = [MDCAlertAction actionWithTitle:@"AGREE" + handler:^(MDCAlertAction *action) { + NSLog(@"%@", @"AGREE pressed"); + }]; + [materialAlertController addAction:agreeAction]; + + MDCAlertAction *okayAction = [MDCAlertAction actionWithTitle:@"OKAY" + handler:^(MDCAlertAction *action) { + NSLog(@"%@", @"OKAY pressed"); + }]; + [materialAlertController addAction:okayAction]; + + MDCAlertAction *acceptAction = [MDCAlertAction actionWithTitle:@"ACCEPT" + handler:^(MDCAlertAction *action) { + NSLog(@"%@", @"ACCEPT pressed"); + }]; + [materialAlertController addAction:acceptAction]; + + [self presentViewController:materialAlertController animated:YES completion:NULL]; +} + + @end diff --git a/components/Dialogs/examples/resources/DialogsAlertViewController.storyboard b/components/Dialogs/examples/resources/DialogsAlertViewController.storyboard index c9c9459e100..bfbc7deb24d 100644 --- a/components/Dialogs/examples/resources/DialogsAlertViewController.storyboard +++ b/components/Dialogs/examples/resources/DialogsAlertViewController.storyboard @@ -1,5 +1,5 @@ - + @@ -51,6 +51,17 @@ + @@ -60,6 +71,8 @@ + + diff --git a/components/Dialogs/src/MDCAlertController.h b/components/Dialogs/src/MDCAlertController.h index 476661a60a2..eac8472d702 100644 --- a/components/Dialogs/src/MDCAlertController.h +++ b/components/Dialogs/src/MDCAlertController.h @@ -89,6 +89,19 @@ /** Descriptive text that summarizes a decision in a sentence of two. */ @property(nonatomic, nullable, copy) NSString *message; +/* + Indicates whether the alert contents should automatically update their font when the device’s + UIContentSizeCategory changes. + + This property is modeled after the adjustsFontForContentSizeCategory property in the + UIConnectSizeCategoryAdjusting protocol added by Apple in iOS 10.0. + + Default value is NO. + */ +@property (nonatomic, readwrite, setter=mdc_setAdjustsFontForContentSizeCategory:) + BOOL mdc_adjustsFontForContentSizeCategory UI_APPEARANCE_SELECTOR; + + /** MDCAlertController handles its own transitioning delegate. */ - (void)setTransitioningDelegate: (_Nullable id)transitioningDelegate NS_UNAVAILABLE; diff --git a/components/Dialogs/src/MDCAlertController.m b/components/Dialogs/src/MDCAlertController.m index 16c5ae7d82b..a89bc6ea1cf 100644 --- a/components/Dialogs/src/MDCAlertController.m +++ b/components/Dialogs/src/MDCAlertController.m @@ -90,6 +90,8 @@ @implementation MDCAlertController { NSMutableArray *_actions; CGSize _previousLayoutSize; + + BOOL _mdc_adjustsFontForContentSizeCategory; } + (instancetype)alertControllerWithTitle:(nullable NSString *)alertTitle @@ -166,6 +168,7 @@ - (void)addAction:(MDCAlertAction *)action { [_actions addObject:[action copy]]; MDCFlatButton *actionButton = [[MDCFlatButton alloc] initWithFrame:CGRectZero]; + actionButton.mdc_adjustsFontForContentSizeCategory = self.mdc_adjustsFontForContentSizeCategory; [actionButton setTitle:action.title forState:UIControlStateNormal]; // TODO(iangordon): Determine default text color values for Normal and Disabled [actionButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; @@ -186,6 +189,50 @@ - (void)addAction:(MDCAlertAction *)action { [self.view setNeedsLayout]; } +- (BOOL)mdc_adjustsFontForContentSizeCategory { + return _mdc_adjustsFontForContentSizeCategory; +} + +- (void)mdc_setAdjustsFontForContentSizeCategory:(BOOL)adjusts { + _mdc_adjustsFontForContentSizeCategory = adjusts; + + // Update any action buttons to match the alert controller. + for (MDCButton *actionButton in self.actionButtons) { + actionButton.mdc_adjustsFontForContentSizeCategory = adjusts; + } + + if (_mdc_adjustsFontForContentSizeCategory) { + [self updateFontsForDynamicType]; + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(contentSizeCategoryDidChange:) + name:UIContentSizeCategoryDidChangeNotification + object:nil]; + } else { + [[NSNotificationCenter defaultCenter] removeObserver:self + name:UIContentSizeCategoryDidChangeNotification + object:nil]; + } +} + +// Handles UIContentSizeCategoryDidChangeNotifications +- (void)contentSizeCategoryDidChange:(NSNotification *)notification { + [self updateFontsForDynamicType]; +} + +// Update the fonts used based on mdc_preferredFontForMaterialTextStyle and recalculate the +// preferred content size. +- (void)updateFontsForDynamicType { + self.titleLabel.font = [UIFont mdc_preferredFontForMaterialTextStyle:MDCFontTextStyleTitle]; + self.messageLabel.font = [UIFont mdc_preferredFontForMaterialTextStyle:MDCFontTextStyleBody1]; + + // The action MDCButtons handle their own resizing + + // Our presentation controller reacts to changes to preferredContentSize to determine our + // frame at the presented controller. + self.preferredContentSize = [self calculatePreferredContentSizeForBounds:CGRectInfinite.size]; +} + + - (void)actionButtonPressed:(id)sender { NSInteger actionIndex = [self.actionButtons indexOfObject:sender]; MDCAlertAction *action = self.actions[actionIndex]; @@ -213,13 +260,21 @@ - (void)viewDidLoad { self.titleLabel = [[UILabel alloc] initWithFrame:CGRectZero]; self.titleLabel.numberOfLines = 0; self.titleLabel.textAlignment = NSTextAlignmentNatural; - self.titleLabel.font = [MDCTypography titleFont]; + if (self.mdc_adjustsFontForContentSizeCategory) { + self.titleLabel.font = [UIFont mdc_preferredFontForMaterialTextStyle:MDCFontTextStyleTitle]; + } else { + self.titleLabel.font = [MDCTypography titleFont]; + } [self.contentScrollView addSubview:self.titleLabel]; self.messageLabel = [[UILabel alloc] initWithFrame:CGRectZero]; self.messageLabel.numberOfLines = 0; self.messageLabel.textAlignment = NSTextAlignmentNatural; - self.messageLabel.font = [MDCTypography body1Font]; + if (self.mdc_adjustsFontForContentSizeCategory) { + self.messageLabel.font = [UIFont mdc_preferredFontForMaterialTextStyle:MDCFontTextStyleBody1]; + } else { + self.messageLabel.font = [MDCTypography body1Font]; + } self.messageLabel.textColor = [UIColor colorWithWhite:0.0 alpha:MDCDialogMessageOpacity]; [self.contentScrollView addSubview:self.messageLabel]; @@ -463,7 +518,7 @@ - (CGSize)actionButtonsSizeInHorizontalLayout { MDCDialogActionsInsets.top + MDCDialogActionButtonHeight + MDCDialogActionsInsets.bottom; size.width = MDCDialogActionsInsets.left + MDCDialogActionsInsets.right; for (UIButton *button in self.actionButtons) { - size.width += button.bounds.size.width; + size.width += CGRectGetWidth(button.bounds); if (button != [self.actionButtons lastObject]) { size.width += MDCDialogActionsHorizontalPadding; } @@ -479,8 +534,8 @@ - (CGSize)actionButtonsSizeInVericalLayout { size.height = MDCDialogActionsInsets.top + MDCDialogActionsInsets.bottom; size.width = MDCDialogActionsInsets.left + MDCDialogActionsInsets.right; for (UIButton *button in self.actionButtons) { - size.height += button.bounds.size.height; - size.width = MAX(size.width, button.bounds.size.width); + size.height += CGRectGetHeight(button.bounds); + size.width = MAX(size.width, CGRectGetWidth(button.bounds)); if (button != [self.actionButtons lastObject]) { size.height += MDCDialogActionsVerticalPadding; } diff --git a/components/Snackbar/src/MDCSnackbarManager.h b/components/Snackbar/src/MDCSnackbarManager.h index aeda7e751e8..0bcc4a63f70 100644 --- a/components/Snackbar/src/MDCSnackbarManager.h +++ b/components/Snackbar/src/MDCSnackbarManager.h @@ -14,7 +14,7 @@ limitations under the License. */ -#import +#import @class MDCSnackbarMessage; @protocol MDCSnackbarSuspensionToken; diff --git a/components/Typography/examples/TypographyMaterialStylesViewController.m b/components/Typography/examples/TypographyMaterialStylesViewController.m index cf92f944350..dd6c16dfc40 100644 --- a/components/Typography/examples/TypographyMaterialStylesViewController.m +++ b/components/Typography/examples/TypographyMaterialStylesViewController.m @@ -134,8 +134,6 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N cell.textLabel.numberOfLines = 0; cell.textLabel.lineBreakMode = NSLineBreakByWordWrapping; - UIFont *currentFont = _styleFonts[indexPath.row]; - if (cell.textLabel.font.pointSize > 100 && indexPath.section == 0) { cell.textLabel.text = @"MDC"; } diff --git a/components/Typography/src/MDCTypography.h b/components/Typography/src/MDCTypography.h index 95e0ad06dbb..da67fbbbadc 100644 --- a/components/Typography/src/MDCTypography.h +++ b/components/Typography/src/MDCTypography.h @@ -36,6 +36,12 @@ /** Asks the receiver to return a font with a medium weight. */ - (nonnull UIFont *)mediumFontOfSize:(CGFloat)fontSize; +/** Asks the receiver to return a font with a bold weight. */ +- (nonnull UIFont *)boldFontOfSize:(CGFloat)fontSize; + +/** Asks the receiver to return an italic font. */ +- (nonnull UIFont *)italicFontOfSize:(CGFloat)fontSize; + @end /** diff --git a/components/Typography/src/MDCTypography.m b/components/Typography/src/MDCTypography.m index 9490c0dab81..ab107959d2b 100644 --- a/components/Typography/src/MDCTypography.m +++ b/components/Typography/src/MDCTypography.m @@ -145,16 +145,36 @@ + (CGFloat)buttonFontOpacity { @implementation MDCSystemFontLoader +- (UIFont *)lightFontOfSize:(CGFloat)fontSize { + if ([UIFont respondsToSelector:@selector(systemFontOfSize:weight:)]) { + return [UIFont systemFontOfSize:fontSize weight:UIFontWeightLight]; + } + return [UIFont systemFontOfSize:fontSize]; +} + - (UIFont *)regularFontOfSize:(CGFloat)fontSize { + if ([UIFont respondsToSelector:@selector(systemFontOfSize:weight:)]) { + return [UIFont systemFontOfSize:fontSize weight:UIFontWeightRegular]; + } return [UIFont systemFontOfSize:fontSize]; } - (UIFont *)mediumFontOfSize:(CGFloat)fontSize { + if ([UIFont respondsToSelector:@selector(systemFontOfSize:weight:)]) { + return [UIFont systemFontOfSize:fontSize weight:UIFontWeightMedium]; + } + return [UIFont systemFontOfSize:fontSize]; +} + +- (UIFont *)boldFontOfSize:(CGFloat)fontSize { + if ([UIFont respondsToSelector:@selector(systemFontOfSize:weight:)]) { + return [UIFont systemFontOfSize:fontSize weight:UIFontWeightBold]; + } return [UIFont boldSystemFontOfSize:fontSize]; } -- (UIFont *)lightFontOfSize:(CGFloat)fontSize { - return [UIFont systemFontOfSize:fontSize]; +- (UIFont *)italicFontOfSize:(CGFloat)fontSize { + return [UIFont italicSystemFontOfSize:fontSize]; } @end diff --git a/components/Typography/src/UIFont+MaterialTypography.m b/components/Typography/src/UIFont+MaterialTypography.m index 71eda823da6..52ebe2f4451 100644 --- a/components/Typography/src/UIFont+MaterialTypography.m +++ b/components/Typography/src/UIFont+MaterialTypography.m @@ -13,11 +13,19 @@ #import "UIFont+MaterialTypography.h" +#import "MDCTypography.h" #import "UIFontDescriptor+MaterialTypography.h" @implementation UIFont (MaterialTypography) + (UIFont *)mdc_preferredFontForMaterialTextStyle:(MDCFontTextStyle)style { + // Due to the way iOS handles missing glyphs in fonts, we do not support using a custom font + // loader with Dynamic Type. + idfontLoader = [MDCTypography fontLoader]; + if (![fontLoader isKindOfClass:[MDCSystemFontLoader class]]) { + NSLog(@"MaterialTypography : Custom font loaders are not compatible with Dynamic Type."); + } + UIFontDescriptor *fontDescriptor = [UIFontDescriptor mdc_preferredFontDescriptorForMaterialTextStyle:style]; diff --git a/components/Typography/tests/unit/SystemFontLoaderTests.m b/components/Typography/tests/unit/SystemFontLoaderTests.m new file mode 100644 index 00000000000..f6d750c8079 --- /dev/null +++ b/components/Typography/tests/unit/SystemFontLoaderTests.m @@ -0,0 +1,52 @@ +/* + Copyright 2017-present the Material Components for iOS authors. All Rights Reserved. + + Licensed under the Apache License Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing software + distributed under the License is distributed on an "AS IS" BASIS + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import +#import "MaterialTypography.h" + +@interface SystemFontLoaderTests : XCTestCase + +@end + +@implementation SystemFontLoaderTests + +- (void)testExample { + // Given + CGFloat size = 10.0; + MDCSystemFontLoader *fontLoader = [[MDCSystemFontLoader alloc] init]; + + // Then + if ([UIFont respondsToSelector:@selector(systemFontOfSize:weight:)]) { + XCTAssertEqual([fontLoader lightFontOfSize:size], + [UIFont systemFontOfSize:size weight: UIFontWeightLight]); + XCTAssertEqual([fontLoader regularFontOfSize:size], + [UIFont systemFontOfSize:size weight: UIFontWeightRegular]); + XCTAssertEqual([fontLoader mediumFontOfSize:size], + [UIFont systemFontOfSize:size weight: UIFontWeightMedium]); + XCTAssertEqual([fontLoader boldFontOfSize:size], + [UIFont systemFontOfSize:size weight: UIFontWeightBold]); + } else { + // Fallback on earlier versions + XCTAssertEqual([fontLoader lightFontOfSize:size], [UIFont systemFontOfSize:size]); + XCTAssertEqual([fontLoader regularFontOfSize:size], [UIFont systemFontOfSize:size]); + XCTAssertEqual([fontLoader mediumFontOfSize:size], [UIFont systemFontOfSize:size]); + XCTAssertEqual([fontLoader boldFontOfSize:size], [UIFont boldSystemFontOfSize:size]); + } + XCTAssertEqual([fontLoader italicFontOfSize:size], [UIFont italicSystemFontOfSize:size]); + +} + +@end diff --git a/demos/Bare/Podfile.lock b/demos/Bare/Podfile.lock index 265245ee554..5be8dd7edf2 100644 --- a/demos/Bare/Podfile.lock +++ b/demos/Bare/Podfile.lock @@ -1,35 +1,35 @@ PODS: - - MaterialComponents (21.3.0): - - MaterialComponents/ActivityIndicator (= 21.3.0) - - MaterialComponents/AnimationTiming (= 21.3.0) - - MaterialComponents/AppBar (= 21.3.0) - - MaterialComponents/ButtonBar (= 21.3.0) - - MaterialComponents/Buttons (= 21.3.0) - - MaterialComponents/CollectionCells (= 21.3.0) - - MaterialComponents/CollectionLayoutAttributes (= 21.3.0) - - MaterialComponents/Collections (= 21.3.0) - - MaterialComponents/Dialogs (= 21.3.0) - - MaterialComponents/FeatureHighlight (= 21.3.0) - - MaterialComponents/FlexibleHeader (= 21.3.0) - - MaterialComponents/HeaderStackView (= 21.3.0) - - MaterialComponents/Ink (= 21.3.0) - - MaterialComponents/NavigationBar (= 21.3.0) - - MaterialComponents/OverlayWindow (= 21.3.0) - - MaterialComponents/PageControl (= 21.3.0) - - MaterialComponents/Palettes (= 21.3.0) - - MaterialComponents/private (= 21.3.0) - - MaterialComponents/ProgressView (= 21.3.0) - - MaterialComponents/ShadowElevations (= 21.3.0) - - MaterialComponents/ShadowLayer (= 21.3.0) - - MaterialComponents/Slider (= 21.3.0) - - MaterialComponents/Snackbar (= 21.3.0) - - MaterialComponents/Tabs (= 21.3.0) - - MaterialComponents/Typography (= 21.3.0) - - MaterialComponents/ActivityIndicator (21.3.0): + - MaterialComponents (22.0.0): + - MaterialComponents/ActivityIndicator (= 22.0.0) + - MaterialComponents/AnimationTiming (= 22.0.0) + - MaterialComponents/AppBar (= 22.0.0) + - MaterialComponents/ButtonBar (= 22.0.0) + - MaterialComponents/Buttons (= 22.0.0) + - MaterialComponents/CollectionCells (= 22.0.0) + - MaterialComponents/CollectionLayoutAttributes (= 22.0.0) + - MaterialComponents/Collections (= 22.0.0) + - MaterialComponents/Dialogs (= 22.0.0) + - MaterialComponents/FeatureHighlight (= 22.0.0) + - MaterialComponents/FlexibleHeader (= 22.0.0) + - MaterialComponents/HeaderStackView (= 22.0.0) + - MaterialComponents/Ink (= 22.0.0) + - MaterialComponents/NavigationBar (= 22.0.0) + - MaterialComponents/OverlayWindow (= 22.0.0) + - MaterialComponents/PageControl (= 22.0.0) + - MaterialComponents/Palettes (= 22.0.0) + - MaterialComponents/private (= 22.0.0) + - MaterialComponents/ProgressView (= 22.0.0) + - MaterialComponents/ShadowElevations (= 22.0.0) + - MaterialComponents/ShadowLayer (= 22.0.0) + - MaterialComponents/Slider (= 22.0.0) + - MaterialComponents/Snackbar (= 22.0.0) + - MaterialComponents/Tabs (= 22.0.0) + - MaterialComponents/Typography (= 22.0.0) + - MaterialComponents/ActivityIndicator (22.0.0): - MaterialComponents/private/Application - MaterialComponents/private/RTL - - MaterialComponents/AnimationTiming (21.3.0) - - MaterialComponents/AppBar (21.3.0): + - MaterialComponents/AnimationTiming (22.0.0) + - MaterialComponents/AppBar (22.0.0): - MaterialComponents/FlexibleHeader - MaterialComponents/HeaderStackView - MaterialComponents/NavigationBar @@ -38,16 +38,16 @@ PODS: - MaterialComponents/ShadowElevations - MaterialComponents/ShadowLayer - MaterialComponents/Typography - - MaterialComponents/ButtonBar (21.3.0): + - MaterialComponents/ButtonBar (22.0.0): - MaterialComponents/Buttons - MaterialComponents/private/RTL - - MaterialComponents/Buttons (21.3.0): + - MaterialComponents/Buttons (22.0.0): - MaterialComponents/Ink - MaterialComponents/ShadowElevations - MaterialComponents/ShadowLayer - MaterialComponents/Typography - MDFTextAccessibility - - MaterialComponents/CollectionCells (21.3.0): + - MaterialComponents/CollectionCells (22.0.0): - MaterialComponents/CollectionLayoutAttributes - MaterialComponents/Ink - MaterialComponents/private/Icons/ic_check @@ -58,86 +58,86 @@ PODS: - MaterialComponents/private/Icons/ic_reorder - MaterialComponents/private/RTL - MaterialComponents/Typography - - MaterialComponents/CollectionLayoutAttributes (21.3.0) - - MaterialComponents/Collections (21.3.0): + - MaterialComponents/CollectionLayoutAttributes (22.0.0) + - MaterialComponents/Collections (22.0.0): - MaterialComponents/CollectionCells - MaterialComponents/CollectionLayoutAttributes - MaterialComponents/Ink - MaterialComponents/ShadowElevations - MaterialComponents/ShadowLayer - MaterialComponents/Typography - - MaterialComponents/Dialogs (21.3.0): + - MaterialComponents/Dialogs (22.0.0): - MaterialComponents/Buttons - MaterialComponents/private/KeyboardWatcher - MaterialComponents/private/RTL - MaterialComponents/ShadowElevations - MaterialComponents/ShadowLayer - - MaterialComponents/FeatureHighlight (21.3.0): + - MaterialComponents/FeatureHighlight (22.0.0): - MaterialComponents/Typography - MDFTextAccessibility - - MaterialComponents/FlexibleHeader (21.3.0): + - MaterialComponents/FlexibleHeader (22.0.0): - MaterialComponents/private/Application - MDFTextAccessibility - - MaterialComponents/HeaderStackView (21.3.0) - - MaterialComponents/Ink (21.3.0) - - MaterialComponents/NavigationBar (21.3.0): + - MaterialComponents/HeaderStackView (22.0.0) + - MaterialComponents/Ink (22.0.0) + - MaterialComponents/NavigationBar (22.0.0): - MaterialComponents/ButtonBar - MaterialComponents/private/RTL - MaterialComponents/Typography - MDFTextAccessibility - - MaterialComponents/OverlayWindow (21.3.0): + - MaterialComponents/OverlayWindow (22.0.0): - MaterialComponents/private/Application - - MaterialComponents/PageControl (21.3.0) - - MaterialComponents/Palettes (21.3.0) - - MaterialComponents/private (21.3.0): - - MaterialComponents/private/Application (= 21.3.0) - - MaterialComponents/private/Icons (= 21.3.0) - - MaterialComponents/private/KeyboardWatcher (= 21.3.0) - - MaterialComponents/private/Overlay (= 21.3.0) - - MaterialComponents/private/RTL (= 21.3.0) - - MaterialComponents/private/ThumbTrack (= 21.3.0) - - MaterialComponents/private/Application (21.3.0) - - MaterialComponents/private/Icons (21.3.0): - - MaterialComponents/private/Icons/Base (= 21.3.0) - - MaterialComponents/private/Icons/ic_arrow_back (= 21.3.0) - - MaterialComponents/private/Icons/ic_check (= 21.3.0) - - MaterialComponents/private/Icons/ic_check_circle (= 21.3.0) - - MaterialComponents/private/Icons/ic_chevron_right (= 21.3.0) - - MaterialComponents/private/Icons/ic_info (= 21.3.0) - - MaterialComponents/private/Icons/ic_radio_button_unchecked (= 21.3.0) - - MaterialComponents/private/Icons/ic_reorder (= 21.3.0) - - MaterialComponents/private/Icons/Base (21.3.0) - - MaterialComponents/private/Icons/ic_arrow_back (21.3.0): + - MaterialComponents/PageControl (22.0.0) + - MaterialComponents/Palettes (22.0.0) + - MaterialComponents/private (22.0.0): + - MaterialComponents/private/Application (= 22.0.0) + - MaterialComponents/private/Icons (= 22.0.0) + - MaterialComponents/private/KeyboardWatcher (= 22.0.0) + - MaterialComponents/private/Overlay (= 22.0.0) + - MaterialComponents/private/RTL (= 22.0.0) + - MaterialComponents/private/ThumbTrack (= 22.0.0) + - MaterialComponents/private/Application (22.0.0) + - MaterialComponents/private/Icons (22.0.0): + - MaterialComponents/private/Icons/Base (= 22.0.0) + - MaterialComponents/private/Icons/ic_arrow_back (= 22.0.0) + - MaterialComponents/private/Icons/ic_check (= 22.0.0) + - MaterialComponents/private/Icons/ic_check_circle (= 22.0.0) + - MaterialComponents/private/Icons/ic_chevron_right (= 22.0.0) + - MaterialComponents/private/Icons/ic_info (= 22.0.0) + - MaterialComponents/private/Icons/ic_radio_button_unchecked (= 22.0.0) + - MaterialComponents/private/Icons/ic_reorder (= 22.0.0) + - MaterialComponents/private/Icons/Base (22.0.0) + - MaterialComponents/private/Icons/ic_arrow_back (22.0.0): - MaterialComponents/private/Icons/Base - - MaterialComponents/private/Icons/ic_check (21.3.0): + - MaterialComponents/private/Icons/ic_check (22.0.0): - MaterialComponents/private/Icons/Base - - MaterialComponents/private/Icons/ic_check_circle (21.3.0): + - MaterialComponents/private/Icons/ic_check_circle (22.0.0): - MaterialComponents/private/Icons/Base - - MaterialComponents/private/Icons/ic_chevron_right (21.3.0): + - MaterialComponents/private/Icons/ic_chevron_right (22.0.0): - MaterialComponents/private/Icons/Base - - MaterialComponents/private/Icons/ic_info (21.3.0): + - MaterialComponents/private/Icons/ic_info (22.0.0): - MaterialComponents/private/Icons/Base - - MaterialComponents/private/Icons/ic_radio_button_unchecked (21.3.0): + - MaterialComponents/private/Icons/ic_radio_button_unchecked (22.0.0): - MaterialComponents/private/Icons/Base - - MaterialComponents/private/Icons/ic_reorder (21.3.0): + - MaterialComponents/private/Icons/ic_reorder (22.0.0): - MaterialComponents/private/Icons/Base - - MaterialComponents/private/KeyboardWatcher (21.3.0): + - MaterialComponents/private/KeyboardWatcher (22.0.0): - MaterialComponents/private/Application - - MaterialComponents/private/Overlay (21.3.0) - - MaterialComponents/private/RTL (21.3.0) - - MaterialComponents/private/ThumbTrack (21.3.0): + - MaterialComponents/private/Overlay (22.0.0) + - MaterialComponents/private/RTL (22.0.0) + - MaterialComponents/private/ThumbTrack (22.0.0): - MaterialComponents/Ink - MaterialComponents/private/RTL - MaterialComponents/ShadowElevations - MaterialComponents/ShadowLayer - MaterialComponents/Typography - - MaterialComponents/ProgressView (21.3.0): + - MaterialComponents/ProgressView (22.0.0): - MaterialComponents/private/RTL - - MaterialComponents/ShadowElevations (21.3.0) - - MaterialComponents/ShadowLayer (21.3.0) - - MaterialComponents/Slider (21.3.0): + - MaterialComponents/ShadowElevations (22.0.0) + - MaterialComponents/ShadowLayer (22.0.0) + - MaterialComponents/Slider (22.0.0): - MaterialComponents/private/ThumbTrack - - MaterialComponents/Snackbar (21.3.0): + - MaterialComponents/Snackbar (22.0.0): - MaterialComponents/AnimationTiming - MaterialComponents/Buttons - MaterialComponents/OverlayWindow @@ -145,12 +145,12 @@ PODS: - MaterialComponents/private/KeyboardWatcher - MaterialComponents/private/Overlay - MaterialComponents/Typography - - MaterialComponents/Tabs (21.3.0): + - MaterialComponents/Tabs (22.0.0): - MaterialComponents/AnimationTiming - MaterialComponents/Ink - MaterialComponents/private/RTL - MaterialComponents/Typography - - MaterialComponents/Typography (21.3.0): + - MaterialComponents/Typography (22.0.0): - MaterialComponents/private/Application - MDFTextAccessibility (1.1.4) @@ -162,7 +162,7 @@ EXTERNAL SOURCES: :path: "../../" SPEC CHECKSUMS: - MaterialComponents: 2ac12e2696035b4fd9b39d8bda4221a5bf701b2b + MaterialComponents: 5b9fb963ed4fa4c5d7a337cc6867c5ba65d8d324 MDFTextAccessibility: aa897b2675bc614c01a331053af680deea692148 PODFILE CHECKSUM: 44e7c616a05bb4ce24db557c3de4bfbe915c2f56 diff --git a/demos/Pesto/Podfile.lock b/demos/Pesto/Podfile.lock index 1a330d29d5d..231245bfa8b 100644 --- a/demos/Pesto/Podfile.lock +++ b/demos/Pesto/Podfile.lock @@ -1,6 +1,6 @@ PODS: - - MaterialComponents/AnimationTiming (21.3.0) - - MaterialComponents/AppBar (21.3.0): + - MaterialComponents/AnimationTiming (22.0.0) + - MaterialComponents/AppBar (22.0.0): - MaterialComponents/FlexibleHeader - MaterialComponents/HeaderStackView - MaterialComponents/NavigationBar @@ -9,16 +9,16 @@ PODS: - MaterialComponents/ShadowElevations - MaterialComponents/ShadowLayer - MaterialComponents/Typography - - MaterialComponents/ButtonBar (21.3.0): + - MaterialComponents/ButtonBar (22.0.0): - MaterialComponents/Buttons - MaterialComponents/private/RTL - - MaterialComponents/Buttons (21.3.0): + - MaterialComponents/Buttons (22.0.0): - MaterialComponents/Ink - MaterialComponents/ShadowElevations - MaterialComponents/ShadowLayer - MaterialComponents/Typography - MDFTextAccessibility - - MaterialComponents/CollectionCells (21.3.0): + - MaterialComponents/CollectionCells (22.0.0): - MaterialComponents/CollectionLayoutAttributes - MaterialComponents/Ink - MaterialComponents/private/Icons/ic_check @@ -29,44 +29,44 @@ PODS: - MaterialComponents/private/Icons/ic_reorder - MaterialComponents/private/RTL - MaterialComponents/Typography - - MaterialComponents/CollectionLayoutAttributes (21.3.0) - - MaterialComponents/Collections (21.3.0): + - MaterialComponents/CollectionLayoutAttributes (22.0.0) + - MaterialComponents/Collections (22.0.0): - MaterialComponents/CollectionCells - MaterialComponents/CollectionLayoutAttributes - MaterialComponents/Ink - MaterialComponents/ShadowElevations - MaterialComponents/ShadowLayer - MaterialComponents/Typography - - MaterialComponents/FlexibleHeader (21.3.0): + - MaterialComponents/FlexibleHeader (22.0.0): - MaterialComponents/private/Application - MDFTextAccessibility - - MaterialComponents/HeaderStackView (21.3.0) - - MaterialComponents/Ink (21.3.0) - - MaterialComponents/NavigationBar (21.3.0): + - MaterialComponents/HeaderStackView (22.0.0) + - MaterialComponents/Ink (22.0.0) + - MaterialComponents/NavigationBar (22.0.0): - MaterialComponents/ButtonBar - MaterialComponents/private/RTL - MaterialComponents/Typography - MDFTextAccessibility - - MaterialComponents/private/Application (21.3.0) - - MaterialComponents/private/Icons/Base (21.3.0) - - MaterialComponents/private/Icons/ic_arrow_back (21.3.0): + - MaterialComponents/private/Application (22.0.0) + - MaterialComponents/private/Icons/Base (22.0.0) + - MaterialComponents/private/Icons/ic_arrow_back (22.0.0): - MaterialComponents/private/Icons/Base - - MaterialComponents/private/Icons/ic_check (21.3.0): + - MaterialComponents/private/Icons/ic_check (22.0.0): - MaterialComponents/private/Icons/Base - - MaterialComponents/private/Icons/ic_check_circle (21.3.0): + - MaterialComponents/private/Icons/ic_check_circle (22.0.0): - MaterialComponents/private/Icons/Base - - MaterialComponents/private/Icons/ic_chevron_right (21.3.0): + - MaterialComponents/private/Icons/ic_chevron_right (22.0.0): - MaterialComponents/private/Icons/Base - - MaterialComponents/private/Icons/ic_info (21.3.0): + - MaterialComponents/private/Icons/ic_info (22.0.0): - MaterialComponents/private/Icons/Base - - MaterialComponents/private/Icons/ic_radio_button_unchecked (21.3.0): + - MaterialComponents/private/Icons/ic_radio_button_unchecked (22.0.0): - MaterialComponents/private/Icons/Base - - MaterialComponents/private/Icons/ic_reorder (21.3.0): + - MaterialComponents/private/Icons/ic_reorder (22.0.0): - MaterialComponents/private/Icons/Base - - MaterialComponents/private/RTL (21.3.0) - - MaterialComponents/ShadowElevations (21.3.0) - - MaterialComponents/ShadowLayer (21.3.0) - - MaterialComponents/Typography (21.3.0): + - MaterialComponents/private/RTL (22.0.0) + - MaterialComponents/ShadowElevations (22.0.0) + - MaterialComponents/ShadowLayer (22.0.0) + - MaterialComponents/Typography (22.0.0): - MaterialComponents/private/Application - MDFTextAccessibility (1.1.4) @@ -85,7 +85,7 @@ EXTERNAL SOURCES: :path: "../../" SPEC CHECKSUMS: - MaterialComponents: 2ac12e2696035b4fd9b39d8bda4221a5bf701b2b + MaterialComponents: 5b9fb963ed4fa4c5d7a337cc6867c5ba65d8d324 MDFTextAccessibility: aa897b2675bc614c01a331053af680deea692148 PODFILE CHECKSUM: 0bae51237ebf30ce3f4ecbcefedc8cf3d7af40cf diff --git a/demos/Shrine/Podfile.lock b/demos/Shrine/Podfile.lock index e30d03dbef0..36f9743d628 100644 --- a/demos/Shrine/Podfile.lock +++ b/demos/Shrine/Podfile.lock @@ -1,5 +1,5 @@ PODS: - - MaterialComponents/AppBar (21.3.0): + - MaterialComponents/AppBar (22.0.0): - MaterialComponents/FlexibleHeader - MaterialComponents/HeaderStackView - MaterialComponents/NavigationBar @@ -8,37 +8,37 @@ PODS: - MaterialComponents/ShadowElevations - MaterialComponents/ShadowLayer - MaterialComponents/Typography - - MaterialComponents/ButtonBar (21.3.0): + - MaterialComponents/ButtonBar (22.0.0): - MaterialComponents/Buttons - MaterialComponents/private/RTL - - MaterialComponents/Buttons (21.3.0): + - MaterialComponents/Buttons (22.0.0): - MaterialComponents/Ink - MaterialComponents/ShadowElevations - MaterialComponents/ShadowLayer - MaterialComponents/Typography - MDFTextAccessibility - - MaterialComponents/FlexibleHeader (21.3.0): + - MaterialComponents/FlexibleHeader (22.0.0): - MaterialComponents/private/Application - MDFTextAccessibility - - MaterialComponents/HeaderStackView (21.3.0) - - MaterialComponents/Ink (21.3.0) - - MaterialComponents/NavigationBar (21.3.0): + - MaterialComponents/HeaderStackView (22.0.0) + - MaterialComponents/Ink (22.0.0) + - MaterialComponents/NavigationBar (22.0.0): - MaterialComponents/ButtonBar - MaterialComponents/private/RTL - MaterialComponents/Typography - MDFTextAccessibility - - MaterialComponents/PageControl (21.3.0) - - MaterialComponents/private/Application (21.3.0) - - MaterialComponents/private/Icons/Base (21.3.0) - - MaterialComponents/private/Icons/ic_arrow_back (21.3.0): + - MaterialComponents/PageControl (22.0.0) + - MaterialComponents/private/Application (22.0.0) + - MaterialComponents/private/Icons/Base (22.0.0) + - MaterialComponents/private/Icons/ic_arrow_back (22.0.0): - MaterialComponents/private/Icons/Base - - MaterialComponents/private/RTL (21.3.0) - - MaterialComponents/ShadowElevations (21.3.0) - - MaterialComponents/ShadowLayer (21.3.0) - - MaterialComponents/Typography (21.3.0): + - MaterialComponents/private/RTL (22.0.0) + - MaterialComponents/ShadowElevations (22.0.0) + - MaterialComponents/ShadowLayer (22.0.0) + - MaterialComponents/Typography (22.0.0): - MaterialComponents/private/Application - MDFTextAccessibility (1.1.4) - - RemoteImageServiceForMDCDemos (21.3.0) + - RemoteImageServiceForMDCDemos (22.0.0) DEPENDENCIES: - MaterialComponents/AppBar (from `../../`) @@ -52,9 +52,9 @@ EXTERNAL SOURCES: :path: "../supplemental" SPEC CHECKSUMS: - MaterialComponents: 2ac12e2696035b4fd9b39d8bda4221a5bf701b2b + MaterialComponents: 5b9fb963ed4fa4c5d7a337cc6867c5ba65d8d324 MDFTextAccessibility: aa897b2675bc614c01a331053af680deea692148 - RemoteImageServiceForMDCDemos: 9c6496fedbf02477d127f7708e3d6e18e177c62e + RemoteImageServiceForMDCDemos: 35133a5485f982fb0dcce4f601cca69544b2abde PODFILE CHECKSUM: 5eb94d7fb8deeb6709b7300f5d0e0e1a75902cca diff --git a/demos/supplemental/RemoteImageServiceForMDCDemos.podspec b/demos/supplemental/RemoteImageServiceForMDCDemos.podspec index 082e133b019..e76b171f1dd 100644 --- a/demos/supplemental/RemoteImageServiceForMDCDemos.podspec +++ b/demos/supplemental/RemoteImageServiceForMDCDemos.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "RemoteImageServiceForMDCDemos" - s.version = "21.3.0" + s.version = "22.0.0" s.summary = "A helper image class for the MDC demos." s.description = "This spec is made for use in the MDC demos. It gets images via url." s.homepage = "https://github.com/material-components/material-components-ios"