Created
February 23, 2021 18:39
-
-
Save karigrooms/83e08753a885067fe4f7313fd154b52d to your computer and use it in GitHub Desktop.
Blog post: SwiftUI with UICollectionView - 1. Simple card view to use inside of UICollectionViewCell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct Card: View { | |
var body: some View { | |
VStack(alignment: .leading, spacing: 8) { | |
Image("condos") | |
.resizable() | |
.clipShape(RoundedRectangle(cornerRadius: 4)) | |
Text("Condo with awesome views of downtown") | |
.font(.headline) | |
Text("$42 avg/night") | |
.font(.body) | |
.lineLimit(1) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment