Skip to content

Commit 6658db3

Browse files
committed
Fixes the orientation issue with the overlay yannickl#89
1 parent bd9ddaf commit 6658db3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Sources/QRCodeReaderViewController.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ public class QRCodeReaderViewController: UIViewController {
137137

138138
func orientationDidChange(_ notification: Notification) {
139139
readerView.view.setNeedsDisplay()
140+
if showOverlayView == true, let qrv = readerView.displayable as? QRCodeReaderView {
141+
qrv.overlayView?.setNeedsDisplay()
142+
}
140143

141144
if let device = notification.object as? UIDevice , codeReader.previewLayer.connection.isVideoOrientationSupported {
142145
codeReader.previewLayer.connection.videoOrientation = QRCodeReader.videoOrientation(deviceOrientation: device.orientation, withSupportedOrientations: supportedInterfaceOrientations, fallbackOrientation: codeReader.previewLayer.connection.videoOrientation)

0 commit comments

Comments
 (0)