mirror of
https://github.com/material-components/material-components-ios.git
synced 2026-02-20 08:27:32 +08:00
489 B
489 B
Typical use: as a view
MDCCard can be used like a regular UIView.
Swift
let card = MDCCard()
// Create, position, and add content views:
let imageView = UIImageView()
card.addSubview(imageView)
Objective-C
MDCCard *card = [[MDCCard alloc] init];
// Create, position, and add content views:
UIImageView *imageView = [[UIImageView alloc] init];
[card addSubview:imageView];