I'm trying to achieve a 2 in row tiles in my SwiftUI app but I cannot.
The tiles are 1 in a row and they are underneath each other.
This is my current code:
ScrollView(.vertical){
VStack(){
VStack(alignment: .trailing, spacing: 6) {
Image("flower")
.resizable()
.frame(width: 160, height: 200)
.clipShape(RoundedRectangle(cornerRadius: 12, style: .continuous))
Text("2/2/2021")
.background(Color.white.opacity(0.2))
.font(.caption)
Text("Some Info goes here because it can...")
.font(.callout)
.frame(width: 160)
}.onTapGesture {
// Handle the action when the card is touched
}
VStack(alignment: .trailing, spacing: 6) {
Image("flower")
.resizable()
.frame(width: 160, height: 200)
.clipShape(RoundedRectangle(cornerRadius: 12, style: .continuous))
Text("2/2/2021")
.background(Color.white.opacity(0.2))
.font(.caption)
Text("Some Info goes here because it can...")
.font(.callout)
.frame(width: 160)
}.onTapGesture {
// Handle the action when the card is touched
}
}
}
This is what I'm trying to achieve:
But this is what I have so far with my code:
Could someone please shed a light on this?