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

Camera not filling UIview #26

Open
Sobhi-IOS opened this issue Jan 13, 2020 · 2 comments
Open

Camera not filling UIview #26

Sobhi-IOS opened this issue Jan 13, 2020 · 2 comments

Comments

@Sobhi-IOS
Copy link

IMG_3412
Hellow @austinkettner

i need filling My CameraKit this UIView GrayColor

can you help me please

@Sobhi-IOS
Copy link
Author

My Code

var previewView: CKFPreviewView = CKFPreviewView()
var cameraSession: CKFVideoSession = CKFVideoSession()

in viewDidload()
self.previewView.session = self.CameraPhotoSession
self.CameraPhotoSession.resolution = CGSize(width: self.capturePreviewView.width, height: self.capturePreviewView.height)
self.capturePreviewView.addSubview(self.previewView)
self.previewView.snp.makeConstraints { (make) in
make.edges.equalToSuperview()

            }
        }

@nmaswood98
Copy link

I was trying to get my cameraVIew to expand horizontally but it should work the same vertically also if thats what you need.

Just add this and then you should be able to resize it to any dimensions.

previewView.previewLayer?.videoGravity = .resizeAspectFill

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

2 participants