Can you please share some code? Thanks!
Post
Replies
Boosts
Views
Activity
I tried something like this (see below), but always the first DocumentGroup will be executed and not the second one, that means whenever I press on '+' or select a document it will execute "DocumentGroup(viewing:DocumentAppDocuments)". How can I distinguish here? Or is this a current issue of the beta version?
@main
struct DocumentApp: App {
@SceneBuilder var body: some Scene {
// Viewing of document
DocumentGroup(viewing:DocumentAppDocuments ) { file in
DocumentPreview(document: file.$document)
}
// Adding of a new document
DocumentGroup(newDocument: DocumentAppDocuments()) { file in
ContentView(document: file.$document)
}
}
}