Two circles on Zstack is not align if view is render on NavigationView.
struct SpinnerView: View {
@State private var isLoading = false
var body: some View {
NavigationView {
ZStack {
Circle()
.stroke(Color(.systemGray5), lineWidth: 7)
.frame(width: 64, height: 64)
Circle()
.trim(from: 0, to: 0.2)
.stroke(Color.green, lineWidth: 7)
.frame(width: 64, height: 64)
.rotationEffect(Angle(degrees: isLoading ? 360 : 0))
.animation(Animation.linear(duration: 1).repeatForever(autoreverses: false))
.onAppear() {
self.isLoading = true
}
}
}
}
}

In order to reproduce your problem, I moved
NavigationViewto a start screenContentViewand launchSpinnerViewwith aNavigationLink. Once I do that, I can see the falling animation.If you turn the animation into an explicit animation triggered by
withAnimation(), and delay it until the view loads, you can avoid the extra movement introduced by theNavigationView. By changingisLoadingtotrueinitially, and then setting it tofalseinonAppearbefore callingwithAnimation, thefalsestate which occurs after the view is loaded will be established (for the purposes of the animation) as the before state. Then, whenisLoadingis set totruein thewithAnimationblock, the animation will proceed. This avoids including the movement caused by imbedding the screen in a navigation screen because this all happens beforeisLoadingis set tofalse.Here is it running in the simulator: