I'm trying to create a simple animation in SwiftUI and I would like the animation to start from center top and end to the center of the screen.
But, as you can see in the video, the animation starts from the top left corner when I use a NavigationView:

This is the code I am using for this example:
struct ContentView: View {
@State var show = false
var body: some View {
NavigationView {
HStack {
Text("Hello, world!")
.padding()
.background(Color.blue)
.offset(x: 0, y: show ? 0 : -30)
.animation(Animation.easeOut.delay(0.6))
.onAppear {
self.show = true
}
.navigationTitle("Why?")
}
}
}
}