Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Landscape mode shows wrong orientation for a split second in .sheet() #92

Open
sdavidliu opened this issue Dec 8, 2022 · 0 comments
Open
Labels
bug Something isn't working

Comments

@sdavidliu
Copy link

I'm adding CodeScanner into a .sheet() for my iPad app that is primarily in landscape mode. When the sheet appears, the camera is briefly shown rotated 90 degrees, and then it fixes itself within a second. Was wondering if there's a simple fix for this.

Here is my setup:

VStack {
    Button(action: { showModal.toggle() }, label: { Text("Button") })
}
.sheet(isPresented: $showModal, content: {
    VStack {
        CodeScannerView(codeTypes: [.qr], videoCaptureDevice: AVCaptureDevice.default(.builtInWideAngleCamera, for: .video, position: .front)) { response in
            print(response)
        }
    }
})
@nathanfallet nathanfallet added the bug Something isn't working label Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants