Closed lichstam closed 7 months ago
i'll have a look tomorrow!
This is how I made the example
All other issues are addressed. You were right btw, somehow the call to the function didn't make it in the first iteration of this PR :)
i'll take a look at the minor comments, however, is this repo even alive?
@lichstam Yes, still alive. Thank you for the contribution for iOS.
np :)
Motivation
I've added support for a dynamic resizeMode in the RealCamera class to address the need for flexible aspect ratio handling of the camera's preview layer. This enhancement allows switching between .resizeAspectFill and .resizeAspect, improving UI flexibility. My main goal was to enable both a full-cover and contained fit for the camera preview without manual adjustments. This feature is critical for applications requiring dynamic adjustments to the camera preview based on user interaction or specific UI layouts.
Testing on iOS
Despite not being a Swift developer, I managed to implement and test these changes on iOS:
Manual Testing: Conducted to ensure the resizeMode property correctly updates the videoGravity of the AVCaptureVideoPreviewLayer. UI Verification: Confirmed the UI updates accordingly, without any disruptions or visual glitches. Regression Testing: Checked that existing functionalities (camera initialization, capture functionality, zoom, and focus adjustments) remain unaffected. Testing was limited to iOS due to my current setup. Android testing is needed to ensure cross-platform compatibility and functionality.