Camera-SwiftUI icon indicating copy to clipboard operation
Camera-SwiftUI copied to clipboard

Camera Screen not filling the whole screen and has vertical or horizontal blank space

Open Jora-sh opened this issue 3 years ago • 2 comments

Is there any way to fill the whole screen?

Jora-sh avatar Sep 05 '22 06:09 Jora-sh

CameraPreview(session: model.session) .scaledToFill() .frame(width: geometry.size.width,height: geometry.size.height )

Skovie avatar Jan 10 '23 22:01 Skovie

Thank you to @Skovie for providing a good headstart to achieving full screen preview. However, it leaves the top not completely going over the flash button so some more changes need to be done to the camera view. A fuller solution would be to tweak the view structure by changing the VStack within the Geometry Reader of the CameraView to a ZStack and then position the flash and other buttons using frame modifiers accordingly.

apekshik avatar Jan 29 '23 15:01 apekshik