The top level of my app looks like:
struct MyApp: App {
var body: some Scene {
DocumentGroup(newDocument: MyDocument()) { file in
MyContentView(document: file.$document)
}
}
}
How do I create a preview for it? #Preview expects a View, not a Scene. I can (and did) create a preview for MyContentView, but that does not show the extra line with the document title that DocumentGroup adds on top, so I cannot judge the overall layout properly.
To illustrate, here's a screen shot. The green area is what MyContentView would show. The red area is the document related line added by DocumentGroup that I currently cannot preview.