SCCameraKitExplicitViewportProvider
@interface SCCameraKitExplicitViewportProvider : NSObject
Enables the configuration of a custom viewport for SCCameraKitPreviewView.
-
Initializes the ExplicitViewportProvider with the specified viewportSize, outputResolution, and safeArea.
Note
The delegate will be set automatically when this class is used to configure SCCameraKitPreviewView so that any change toviewportSize
,outputResolution
, andsafeArea
is propagated.Declaration
Objective-C
- (nonnull instancetype)initWithViewportSize:(CGSize)viewportSize outputResolution:(CGSize)outputResolution safeArea:(CGRect)safeArea;
Parameters
viewportSize
Output viewport frame size.
outputResolution
Output resolution size in pixels, not points (i.e. 1125x2436 not 375x812).
safeArea
A CGRect describing an area that the host app will not draw on top of.
-
Sets the output viewport size and propagates the change to SCCameraKitPreviewView.
Declaration
Objective-C
- (void)setViewportSize:(CGSize)viewportSize;
Parameters
viewportSize
Output viewport frame size.
-
Sets the output resolution and propagates the change to SCCameraKitPreviewView.
Declaration
Objective-C
- (void)setOutputResolution:(CGSize)outputResolution;
Parameters
outputResolution
Output resolution size in pixels, not points (i.e. 1125x2436 not 375x812).
-
Sets the safe area and propagates the change to SCCameraKitPreviewView.
Declaration
Objective-C
- (void)setSafeArea:(CGRect)safeArea;
Parameters
safeArea
A CGRect describing an area that the host app will not draw on top of.
-
Unavailable
Use the designated initializer to pass in the required properties.
Declaration
Objective-C
- (nonnull instancetype)init;
-
Unavailable
Undocumented
Declaration
Objective-C
+ (instancetype)new NS_UNAVAILABLE;