HomeiOS Developmentios - SwiftUI Customized Digital camera View - Can't See Digital camera...

ios – SwiftUI Customized Digital camera View – Can’t See Digital camera View


I’m attempting to construct a customized digital camera in an iOS app written in SwiftUI. I’ve used the code from this publish precisely — simply copied and pasted it into my challenge to try it out. My ContentView‘s physique consists of MyCameraView().

After I run the code, all I see is a white display and the black seize button (see hooked up picture). Can somebody please assist me appropriate this?

Upon doing a little testing, it seems as if the customCameraRepresentable will not be being up to date after its declaration in MyCameraView:

var customCameraRepresentable = CustomCameraRepresentable(
    cameraFrame: .zero,
    imageCompletion: { _ in }
)

The cameraFrame stays being set to .zero and the imageCompletion stays being { _ in }. And I consider that is what’s inflicting the issue. Nonetheless, I’m not positive how one can revise the code to repair this. Please advise. enter image description here

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments