Skip to content

Commit

Permalink
Use ListThemer for List example (#5502)
Browse files Browse the repository at this point in the history
## The problem:

The Stereo cell example wasn't using the List Themer.

## The solution:

Make the Stereo cell example use the List Themer.

I didn't include before and after screenshots because there is no visual change.

Closes #5501.
  • Loading branch information
andrewoverton committed Oct 24, 2018
1 parent 941da20 commit 49b29af
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions components/List/examples/MDCSelfSizingStereoCellExample.m
Expand Up @@ -16,8 +16,7 @@

#import <MDFInternationalization/MDFInternationalization.h>

#import "MaterialList+ColorThemer.h"
#import "MaterialList+TypographyThemer.h"
#import "MaterialList+ListThemer.h"
#import "MaterialList.h"

static CGFloat const kArbitraryCellHeight = 75.f;
Expand All @@ -31,8 +30,7 @@ @interface MDCSelfSizingStereoCellExample () <UICollectionViewDelegate, UICollec
@property(nonatomic, strong) UICollectionView *collectionView;
@property(nonatomic, strong) UICollectionViewFlowLayout *collectionViewLayout;
@property(nonatomic, strong) NSArray *randomStrings;
@property(nonatomic, strong) MDCTypographyScheme *typographyScheme;
@property(nonatomic, strong) MDCSemanticColorScheme *colorScheme;
@property(nonatomic, strong) MDCListScheme *listScheme;
@property(nonatomic, assign) NSInteger numberOfCells;
@end

Expand All @@ -42,8 +40,7 @@ - (void)viewDidLoad {
[super viewDidLoad];
self.parentViewController.automaticallyAdjustsScrollViewInsets = NO;
self.automaticallyAdjustsScrollViewInsets = NO;
self.typographyScheme = [[MDCTypographyScheme alloc] init];
self.colorScheme = [[MDCSemanticColorScheme alloc] init];
self.listScheme = [[MDCListScheme alloc] init];
[self createDataSource];
[self createCollectionView];
}
Expand Down Expand Up @@ -121,8 +118,7 @@ - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView
cell.leadingImageView.tintColor = [UIColor darkGrayColor];
cell.trailingImageView.tintColor = [UIColor darkGrayColor];
cell.mdc_adjustsFontForContentSizeCategory = YES;
[MDCListColorThemer applySemanticColorScheme:self.colorScheme toSelfSizingStereoCell:cell];
[MDCListTypographyThemer applyTypographyScheme:self.typographyScheme toSelfSizingStereoCell:cell];
[MDCListThemer applyScheme:self.listScheme toSelfSizingStereoCell:cell];
return cell;
}

Expand Down

0 comments on commit 49b29af

Please sign in to comment.