SwiftUI NavigationView on the iPad Pro

前端 未结 6 841
伪装坚强ぢ
伪装坚强ぢ 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:38

    You can override the default splitView used on iPad, by having the NavigationView display the same stacked view you see on iPhone, by setting .navigationViewStyle(StackNavigationViewStyle())

    Quite helpful during development and debugging, and when you have not developed the detailedView() yet.

提交回复
热议问题