There are many tutorials out there on how to show a UIViewControllerRepresentable (e.g. to show a VNDocumentCameraViewController) as a sheet, but is there any way to show it as a regular view using NavigationLink, or just including it in another view.
Currently, if I include it like this:
NavigationLink("Add with camera", destination: ScannerView(completion: {result in resultHandler(text: result)}))
The view shows up like this (embedded in the tab navigation view instead of taking up the whole screen) and the Save button (completion) does not work:
If I include it straight in the view, Xcode gives me an "Initializer is never used" error and it does not show up in the view.