Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Unified Diff: ios/chrome/browser/ui/settings/material_cell_catalog_view_controller.mm

Issue 2768933005: Use CollectionViewTextItem instead of a cast (Closed)
Patch Set: Fix payment Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/ui/settings/material_cell_catalog_view_controller.mm
diff --git a/ios/chrome/browser/ui/settings/material_cell_catalog_view_controller.mm b/ios/chrome/browser/ui/settings/material_cell_catalog_view_controller.mm
index ad7ddf797d7f8dfb60de06ec8967cdf25a331c62..f690fbfe28644e2449e0cdc3f08b8a52292509d4 100644
--- a/ios/chrome/browser/ui/settings/material_cell_catalog_view_controller.mm
+++ b/ios/chrome/browser/ui/settings/material_cell_catalog_view_controller.mm
@@ -111,6 +111,9 @@ const CGFloat kHorizontalImageFixedSize = 40;
CollectionViewTextItem* textHeader = [
[[CollectionViewTextItem alloc] initWithType:ItemTypeHeader] autorelease];
textHeader.text = @"MDCCollectionViewTextCell";
+ textHeader.textFont =
+ [[MDFRobotoFontLoader sharedInstance] mediumFontOfSize:14];
lpromero 2017/03/24 09:28:24 MDCTypography got updated recently to have medium
gambard 2017/03/24 09:49:03 Done.
+ textHeader.textColor = [[MDCPalette greyPalette] tint500];
[model setHeader:textHeader
forSectionWithIdentifier:SectionIdentifierTextCell];
@@ -329,25 +332,6 @@ const CGFloat kHorizontalImageFixedSize = 40;
self.styler.cellStyle = MDCCollectionViewCellStyleCard;
}
-#pragma mark UICollectionViewDataSource
-
-- (UICollectionReusableView*)collectionView:(UICollectionView*)collectionView
- viewForSupplementaryElementOfKind:(NSString*)kind
- atIndexPath:(NSIndexPath*)indexPath {
- UICollectionReusableView* cell = [super collectionView:collectionView
- viewForSupplementaryElementOfKind:kind
- atIndexPath:indexPath];
- MDCCollectionViewTextCell* textCell =
- base::mac::ObjCCast<MDCCollectionViewTextCell>(cell);
- if (textCell) {
- textCell.textLabel.font =
- [[MDFRobotoFontLoader sharedInstance] mediumFontOfSize:14];
- textCell.textLabel.textColor = [[MDCPalette greyPalette] tint500];
- }
-
- return cell;
-};
-
#pragma mark MDCCollectionViewStylingDelegate
- (CGFloat)collectionView:(nonnull UICollectionView*)collectionView

Powered by Google App Engine
This is Rietveld 408576698