feat: Implement resizeMode prop for iOS (#1838)
* feat: Implement `resizeMode` prop for iOS - `"cover"`: Keep aspect ratio, but fill entire parent view (centered). - `"contain"`: Keep aspect ratio, but make sure the entire content is visible even if it introduces additional blank areas (centered). * chore: Update prop docs * Update CameraProps.ts * Lint & Format
This commit is contained in:
@@ -59,6 +59,12 @@ public final class CameraView: UIView {
|
||||
@objc var zoom: NSNumber = 1.0 // in "factor"
|
||||
@objc var enableFpsGraph = false
|
||||
@objc var videoStabilizationMode: NSString?
|
||||
@objc var resizeMode: NSString = "cover" {
|
||||
didSet {
|
||||
previewView.resizeMode = ResizeMode(fromTypeScriptUnion: resizeMode as String)
|
||||
}
|
||||
}
|
||||
|
||||
// events
|
||||
@objc var onInitialized: RCTDirectEventBlock?
|
||||
@objc var onError: RCTDirectEventBlock?
|
||||
|
||||
Reference in New Issue
Block a user