From 46ab0a4239a441c8dcf04841a6c51e9f3aa6cbb0 Mon Sep 17 00:00:00 2001 From: Sebastian Villena <97059974+ruisebas@users.noreply.github.com> Date: Fri, 5 Jul 2024 17:25:13 -0400 Subject: [PATCH] fix: Calculating camera frame size on viewWillAppear instead --- .../FaceLiveness/Views/Liveness/LivenessViewController.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Sources/FaceLiveness/Views/Liveness/LivenessViewController.swift b/Sources/FaceLiveness/Views/Liveness/LivenessViewController.swift index 5e698f23..299094b7 100644 --- a/Sources/FaceLiveness/Views/Liveness/LivenessViewController.swift +++ b/Sources/FaceLiveness/Views/Liveness/LivenessViewController.swift @@ -49,7 +49,11 @@ final class _LivenessViewController: UIViewController { super.viewDidLoad() view.backgroundColor = .black layoutSubviews() + } + + override func viewWillAppear(_ animated: Bool) { setupAVLayer() + super.viewWillAppear(animated) } private func layoutSubviews() {