SwiftUI NavigationView on the iPad Pro

前端 未结 6 870
伪装坚强ぢ
伪装坚强ぢ 2020-12-28 13:09

I use the Apple SwiftUI tutorial code. Then I set the previewDevice to iPad Pro (12.9-inch). But the preview has something wrong. Does anyone know where the problem is?

6条回答
  •  清酒与你
    2020-12-28 13:36

    You have embedded your body in NavigationView.In iPad,you have to slide the drawer from left side to view your content view.

    Remove NavigationView and observe the behaviour

    To override default behaviour, use below code

    NavigationView { ... } .navigationViewStyle(DoubleColumnNavigationViewStyle()) .padding()

提交回复
热议问题