The video wwdc21-10062 claimed that by using swiftUI developers can build an app with a detail panel (like the right sidebar in Xcode), but didn't say how to implement that.
I have tried to use HSplitView
but failed.
My code is like:
var body: some View {
NavigationView {
Text("sidebar")
HSplitView {
Text("Primary View")
Text("Detail Panel")
}
}
}