SwiftUI Navigation on iPad - How to show master list

后端 未结 3 1003
误落风尘
误落风尘 2020-12-31 01:31

My app has simple navigation needs

  • List View (parent objects)
  • List View (child objects)
  • Detail View (child object)

I have this

3条回答
  •  自闭症患者
    2020-12-31 02:17

    In portrait the default split view does not work. This may be fixed in future but it appears the current options are:
    (a) change the navigation view style of your first list to .navigationViewStyle(StackNavigationViewStyle()) so the navigation will work like on iPhone and push each view.

    (b) leave the style to default and only support landscape for iPad

    (c) implement a UIKit split view controller

提交回复
热议问题