I was able to restore the Sidebar in the app by adding a third Text object in the navigation view and building and running the app.
import SwiftUI
struct ContentView: View {
var body: some View {
NavigationView {
Text("Sidebar")
Text("Content")
.padding()
Text("More content")
}
}
}
Then stop the app, delete the third Text object, rebuild and run the app, and I am back to the original default settings. However, if I ever drag the boundary between Sidebar and Content too far to the left, it will disappear forever until I repeat this "fix". It sure would be nice to have a programmatic way to do this rather than rely on this kludge. Any help, anyone?
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: