SwiftUI:
I am trying to transfer to secondView from firstView on iPad Pro(11inch) Horizontal screen,the secondView can not be showed in full screen
here is my code:
import SwiftUI
struct ContentView: View {
@State var showsecondView: Bool = false
var body: some View {
Button(action: {
self.showsecondView.toggle()
}) {
Text("firstView")
}.sheet(isPresented: self.$showsecondView){
secondView(showsecondView: self.$showsecondView)
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
struct secondView: View {
@Binding var showsecondView: Bool
var body: some View {
Text("secondView")
}
}