SCCameraKitAdjustmentsProcessor
Objective-C
@protocol SCCameraKitAdjustmentsProcessor <NSObject>
Swift
protocol AdjustmentsProcessor : NSObjectProtocol
The adjustments processor handles adjusting camera frames before they are processed by lenses.
-
Checks if an adjustment is available and supported by the current device. Some adjustments are performance sensitive or require specific hardware which may mean they are unavailable on specific devices. You should call this method before showing any UI associated with the adjustment.
Declaration
Objective-C
- (BOOL)isAdjustmentAvailable:(nonnull id<SCCameraKitAdjustment>)adjustment;Swift
func isAdjustmentAvailable(_ adjustment: any SCCameraKitAdjustment) -> BoolParameters
adjustmentthe adjustment to check.
-
Applies the specified adjustment.
Declaration
Objective-C
- (nullable id<SCCameraKitAdjustmentController>) applyAdjustment:(nonnull id<SCCameraKitAdjustment>)adjustment error:(NSError *_Nullable *_Nullable)error;Swift
func apply(_ adjustment: any SCCameraKitAdjustment) throws -> any SCCameraKitAdjustmentControllerParameters
adjustmentThe adjustment to apply.
errorAny error that may occur during application.
-
Removes an adjustment.
Declaration
Objective-C
- (void)removeAdjustmentController: (nonnull id<SCCameraKitAdjustmentController>)adjustmentController;Swift
func remove(_ adjustmentController: any SCCameraKitAdjustmentController)Parameters
adjustmentControllerthe controller associated with the adjustment you wish to remove.
-
Adds observer to receive notifications of changes to adjustments processor state. Returns if observer got successfully added
Declaration
Objective-C
- (BOOL)addObserver: (nonnull id<SCCameraKitAdjustmentsProcessorObserver>)observer;Swift
func addObserver(_ observer: any SCCameraKitAdjustmentsProcessorObserver) -> BoolParameters
observerthe observer who wishes to receive callbacks.
-
Removes observer from receiving notifications of changes to adjustments availability.
Declaration
Objective-C
- (void)removeObserver: (nonnull id<SCCameraKitAdjustmentsProcessorObserver>)observer;Swift
func removeObserver(_ observer: any SCCameraKitAdjustmentsProcessorObserver)Parameters
observerthe observer who wishes to stop receiving callbacks.