UISplitViewController in SwiftUI

The latest release of Xcode 11 Beta 3 brings some change to SwiftUI components and also bring new a new(old) layout to NavigationView , UISplitViewController .

This layout has been demonstrated at the end of Session 216 SwiftUI Essentials, but it didn't work in beta 1 and 2. In this beta 3, Apple secretly brought this layout to life (Not fully functional though).

NavigationView {

List {

NavigationLink ( "Go to detail" , destination : Text ( "New Detail" ) )

} . navigationBarTitle ( "Master" )

Text ( "Placeholder for Detail" )

}

I play around with .navigationViewStyle and complex destination 's view, but can't make it work with a complex layout, it only supports very basic structure where the master view is a list and detail view is a leaf view. Maybe there is a way, but I will just wait for a proper document in the next release.

Feel free to follow me on Twitter and ask your questions related to this post. Thanks for reading and see you next time.

If you enjoy my writing, please check out my Patreon https://www.patreon.com/sarunw and become my supporter. Sharing the article is also greatly appreciated.

Become a patron

Tweet

Share

← Home