I found an interesting issue with NavigationView.
Here is the simple code:
import SwiftUI
struct ContentView: View {
var body: some View {
NavigationView {
ZStack {
Color(.lightGray)
.edgesIgnoringSafeArea(.all)
Text("hello world")
}
.navigationBarTitle("", displayMode: .inline)
.navigationBarItems(leading: Button(action: {
print("Edit button tapped")
}, label: {
Text("Edit")
}))
}
.navigationViewStyle(StackNavigationViewStyle())
}
}
When I'm trying to run on iPhone 8 simulator in portrait mode and rotate to landscape I see something strange with position of NavigationView(). After the second rotate everything become as expected.
Looks like this is a bug in SDK.
Xcode 11.5
iOS 13.5
Any thoughts?
Thanks