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"))
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.


If you enjoy this article, you can subscribe to the weekly newsletter.

Every Friday, you’ll get a quick recap of all articles and tips posted on this site — entirely for free.

← Home