I have a card view. Which sizes I give myself. I know that is wrong. I want to do it resizable and divided by percent like blue = 70% & red = 30% or something like this. But don't know how. Im new on SwiftUI. There is my code below:
let screen = UIScreen.main.bounds
struct CardView: View {
var body: some View {
VStack {
VStack {
Text("Blue")
}
.frame(width: screen.width - 60, height: 180)
.background(Color.blue)
VStack {
Text("Red")
}
.frame(width: screen.width - 60, height: 100)
.background(Color.red)
}
.frame(width: screen.width - 60, height: 280)
}
}
And my view is:

