Closed timostuebing closed 5 years ago
OK, tough one - that structure is a bit odd so I had to find a good way to make it work while keeping backward compatibility.
Please install plugin version 3.3.2 and add presentInRootViewController: true
to your scan
options.
In our project, we built a custom navigation bar which we include once in the app.component.html like so
(In the real project the custom navigation is a component with more functionality, of course)
home.component.html
home.component.ts
If we open the barcodescanner in fullscreen now and either close it or scan something, on iOS the navigation bar vanishes.
Our assumption is that Nativescript only renders the page-router-outlet when returning from the scanner.
Using the embeddedMode from the scanner would be painful because it doesn't fit to the whole application being built.
The whole example minimum project is available here: https://github.com/timogroeger/barcodescanner-vanishes.git
Any advice is really appreciated. Cheers!