ZoomDelegate

Objective-C

@protocol ZoomDelegate <NSObject>

Swift

protocol ZoomDelegate : NSObjectProtocol

A protocol to receive updates from camera zoom

  • Delegate method to receive update of zooming

    Declaration

    Objective-C

    - (void)zoomTo:(float)factor
             withRampRate:(float)rate
        completionHandler:(nullable ZoomActionCallback)callback;

    Swift

    func zoom(to factor: Float, withRampRate rate: Float) async -> (Bool, Float)

    Parameters

    factor

    a float to control the zoom factor

    rate

    a float to control the ramp rate of zoom

    callback

    a callback with zoom changed and new zoom level

  • Delegate method to receive update of zooming

    Declaration

    Objective-C

    - (void)zoomTo:(float)factor
        completionHandler:(nullable ZoomActionCallback)callback;

    Swift

    func zoom(to factor: Float) async -> (Bool, Float)

    Parameters

    factor

    a float to control the zoom factor

    callback

    a callback with zoom changed and new zoom level

  • Current zoom factor from the camera

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGFloat currentZoomFactor;

    Swift

    var currentZoomFactor: CGFloat { get }
  • A threshold of the zoom factor upscale

    Declaration

    Objective-C

    @property (readonly) CGFloat zoomFactorUpscaleThreshold;

    Swift

    var zoomFactorUpscaleThreshold: CGFloat { get }