Animating the circles
Now we have all our circle pairs in place, it’s time to start animating them. I’m going to add the animation code. It may look a bit strange at first, but not to worry, I will explain it line by line:
//MARK: - Animations .rotationEffect(.degrees(rotateInOut ? 90 : 0)) .scaleEffect(scaleUpDown ? 1 : 1/4) .animation(Animation.easeInOut. repeatForever(autoreverses: true).speed(1/8), value: scaleInOut) .onAppear() { ...