Posts

Post not yet marked as solved
3 Replies
1.6k Views
I'm working on an app that renders a document in a Content view and would like to show a Navigator view in a sidebar on iPad to let the user navigate the content of the app. I have set up a new project to trial this using DocumentGroup. When I put both the Navigator and Content as the document group's content, they are stacked vertically. I figured perhaps I should be using NavigationView to achieve this, but when I do this I get a navigation bar in both the Navigator and Content views and each are below the standard bar that seems to be provided by the DocumentGroup. The code I've used looks like the following: @main struct TheApp: App {     var body: some Scene {         DocumentGroup(newDocument: Document()) { file in             NavigationView {                 Navigator(document: file.$document)                 Content(document: file.$document)             }         }     } } Is it possible to have the standard sidebar behaviour in an iPad SwiftUI document app?
Posted Last updated
.