You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
Meyssam120
changed the title
[BUG] @Environment and @State hide the camera controls
[BUG] Fields in View hide the camera controls
Dec 27, 2024
I have this view
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()
withViewModel
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
The text was updated successfully, but these errors were encountered: