I have several shapes names circle1(),circle2(),circle3(), up to circle20() all with slightly different attributes. How can I use forEach in the same way that I could use string interpolation to loop through all of them.
ForEach(0..<20){ i in
Image("circle\(i)").offset(x:CGFloat(i * 100),y:0)
}
The above example is for an image and it works fine, but would there be a way to do the same with similar named shapes? Of course the following example below didn't work:
ForEach(0..<20){ i in
circle\(i).offset(x:CGFloat(i * 100),y:0)
}