You can theme a card with your app's shape scheme using the ShapeThemer extension.
You must first add the ShapeThemer extension to your project:
pod 'MaterialComponents/Cards+ShapeThemer'
// Step 1: Import the ShapeThemer extension import MaterialComponents.MaterialCards_ShapeThemer // Step 2: Create or get a shape scheme let shapeScheme = MDCShapeScheme() // Step 3: Apply the shape scheme to your component MDCCardsShapeThemer.applyShapeScheme(shapeScheme, to: component)
// Step 1: Import the ShapeThemer extension #import "MaterialCards+ShapeThemer.h" // Step 2: Create or get a shape scheme id<MDCShapeScheming> shapeScheme = [[MDCShapeScheme alloc] init]; // Step 3: Apply the shape scheme to your component [MDCCardsShapeThemer applyShapeScheme:shapeScheme toCard:component];