Closed neilbrazil closed 4 years ago
I encountered the same problem here!
As the viewWillLayoutSubviews()
is called before viewDidAppear()
, the access to the implicitly unwrapped previewLayer
will crash.
I've fixed the issue in a fork, tested it on my device successfully. See the open pull request.
I believe this is resolved in #7.
Hi @twostraws
While using the package for the Hot Prospects tutorial, I get the following error when running on a device (iPhone 11 - iOS 13.4.1) after tapping the Scan QR button.
Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value
The Debug navigator highlights the following code from line 173 in the package.
override public func viewWillLayoutSubviews() { previewLayer.frame = view.layer.bounds }
Any help appreciated as loving the tutorials. Thank you