I have a view and I am trying to changing it size by different ratios.
this is my view:
struct CoolView: View {
var body: some View {
Rectangle().frame(width: 50, height: 50)
}
}
and here I am trying to size it with different ratios:
struct mainView: View {
var body: some View {
VStack {
CoolView().frame(width: 0.6, height: 0.6) // <-- 0.6 from original size
CoolView().frame(width: 0.5, height: 0.5) // <-- 0.5 from original size
CoolView().frame(width: 0.2, height: 0.2) // <-- 0.2 from original size
}
}
}