rorodriguez116 / Camera-SwiftUI

A lightweight camera library for quick integration with SwiftUI - iOS/iPadOS only

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

JavadSheikhsagha opened this issue · comments

Is there any way to fill the whole screen?

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

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.