Orientasi SwiftUi gagal setelah perubahan orientasi perubahan
struct ContentView: View {
@State private var selection = 0
var body: some View {
NavigationView {
VStack {
Button(action: {
}) {
Text("Tap me")
.padding()
.foregroundColor(.white)
.background(Color.blue)
.cornerRadius(8)
}.shadow(color: Color.blue, radius: 20, y: 5)
.frame(width: 300, height: 100, alignment: .trailing)
Text("SwiftUI")
.navigationBarTitle("Nav Title")
}
Color.red.edgesIgnoringSafeArea([.top,.bottom,.leading,.trailing])
}
.phoneOnlyStackNavigationView()
}
}
ashkan goharfar