I'm using the new 'DocumentGroup' Scene for an iOS 14 (currently working on Beta) project and I really don't know how can I detect events in the navigation bar like pressing '<' or back (see screen)of the predefined Navigation bar of the 'DoucmentGroup' Scene. For custom buttons it's possible and it's also not a big deal to change the style of the bar(like gray). I tried to disable the button, adding new buttons to the navigation bar etc. The following example is the standard code when you are going to create a new document based app in Xcode:
@main struct DocumentAppApp: App {
@SceneBuilder var body: some Scene {
// Adding of a new document
DocumentGroup(newDocument: DocumentAppDocuments()) { file in
ContentView(document: file.$document) // .navigationBarBackButtonHidden(true)
}
}
}
struct ContentView: View {
@Binding var document: DocumentAppDocuments
var body: some View {
TextEditor(text: $document.text)
}
}