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

[BUG] Fields in View hide the camera controls #81

Open
Meyssam120 opened this issue Dec 27, 2024 · 0 comments
Open

[BUG] Fields in View hide the camera controls #81

Meyssam120 opened this issue Dec 27, 2024 · 0 comments

Comments

@Meyssam120
Copy link

Meyssam120 commented Dec 27, 2024

I have this view

struct MyCamera: View {
    
    @Environment(\.dismiss) private var dismiss
    
    var body: some View {
        MCamera()
            .setAudioAvailability(false)
            .startSession()
    }
}

it produces this screen

However I was expecting this screen:

I noticed that the controls become invisible (like in the first picture) different kinds of fields in the view. So when I remove @Environment(\.dismiss) private var dismiss it works fine.
It also does not work with this line @State private var viewModel = ViewModel() with ViewModel being any type of class. If I leave out @State it does not work either.
However I could observe, that a simple variable e.g. holding a Bool was not showing the same result.

I use iOS 18.2, Xcode 16.2 and Camera Version 3.0.1

@Meyssam120 Meyssam120 changed the title [BUG] @Environment and @State hide the camera controls [BUG] Fields in View hide the camera controls Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant