Hello guys! I would like to change the position of a shape but I can't understand which command I have to put in the code so that the square will be to the right.
let columns: [GridItem] = [GridItem(.flexible()),
GridItem(.flexible()),
GridItem(.flexible())]
struct ContentView: View {
var body: some View {
GeometryReader { geometry in
VStack{
Spacer()
ZStack {
LazyVGrid(columns: columns) {
Circle()
.frame(width: 100, height: 100)
.foregroundColor(Color(.systemBlue))
.opacity(0.5)
Circle()
.frame(width: 100, height: 100)
.foregroundColor(Color(.systemBlue))
.opacity(0.5)
Circle()
.frame(width: 100, height: 100)
.foregroundColor(Color(.systemBlue))
.opacity(0.5)
Circle()
.frame(width: 100, height: 100)
.foregroundColor(Color(.systemBlue))
.opacity(0.5)
Circle()
.frame(width: 100, height: 100)
.foregroundColor(Color(.systemBlue))
.opacity(0.5)
Circle()
.frame(width: 100, height: 100)
.foregroundColor(Color(.systemBlue))
.opacity(0.5)
Circle()
.frame(width: 100, height: 100)
.foregroundColor(Color(.systemBlue))
.opacity(0.5)
Circle()
.frame(width: 100, height: 100)
.foregroundColor(Color(.systemBlue))
.opacity(0.5)
Circle()
.frame(width: 100, height: 100)
.foregroundColor(Color(.systemBlue))
.opacity(0.5)
Rectangle()
.frame(width: 200, height: 80)
.foregroundColor(Color(.systemBlue))
.opacity(0.5)
.cornerRadius(60)
}
}
Spacer()
}
}
}
}
Of course if I did something wrong, please tell me...
Thank u, have a great day!