When the CodeScannerView is used in a navigation stack, if you navigate
back to it it will no longer scan any codes (because
isFinishedScanning is true). This changes it so that we reset the state
of the ScannerController when the view apepars, so that it's ready to
be reused.
It seems like adding a .navigationViewStyle(StackNaviagtionViewStyle()) onto a NavigationView breaks this fix. I'm trying to add this so an iPad doesn't go into split screen for the menu.
When the CodeScannerView is used in a navigation stack, if you navigate back to it it will no longer scan any codes (because isFinishedScanning is true). This changes it so that we reset the state of the ScannerController when the view apepars, so that it's ready to be reused.