Hello everyone!
I was putting a figure in my code when I was interrupted by this error that says "Extra argument in call", what does this sentence mean and how can I fix it?
Thanks!
Try this:
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) {
Group {
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)
}
Group {
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)
.position(x: 114, y: 55)
Circle()
}
}
}
Spacer()
}
}
}
}