Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

swiftui orientation failed after change orientation popup

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()

    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #swiftui #orientation #failed #change #orientation #popup
ADD COMMENT
Topic
Name
7+1 =