I'm getting an error when trying to compile my project using xcode 12.
The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
The compiler hints that the error is at the last modifier .offset() in this snippet:
func circle(geometry: GeometryProxy, index: Int) -> some View {
return Circle()
.fill(Color.mediumGray)
.frame(width: geometry.size.width / 5, height: geometry.size.height / 5)
.scaleEffect(!self.isAnimating ? 1 - CGFloat(index) / 4 : 0.1 + CGFloat(index) / 5)
.offset(y: geometry.size.width / 10 - geometry.size.height / 2)
}
Selecting any option will automatically load the page