Focus Gestures

Defined in framework ScanditCaptureCore

FocusGesture
protocol FocusGesture : NSObjectProtocol

Added in version 6.6.0

Common interface for all the focus gestures.

triggerFocus
open func triggerFocus(_ pointWithUnit: PointWithUnit) -> Void

Added in version 6.7.0

Triggers a focus as if the focus gesture was performed.

add
open func add(_ listener: any FocusGestureListener) -> Void

Added in version 6.7.0

Adds the listener to this gesture.

In case the same listener is already observing this instance, calling this method will not add the listener again.

remove
open func remove(_ listener: any FocusGestureListener) -> Void

Added in version 6.7.0

Removes a previously added listener from this gesture.

In case the listener is not currently observing this instance, calling this method has no effect.

jsonString
open var jsonString: String { get }

Added in version 6.7.0

Returns the JSON representation of the focus gesture.

showUIIndicator
open var showUIIndicator: Bool { get, set }

Added in version 6.19.0

If enabled triggering the focus gesture will also show a visual indicator. Defaults to true.

TapToFocus
open class TapToFocus : NSObject, FocusGesture

Added in version 6.6.0

Tap to focus gesture.

init
init()

Added in version 6.6.0

Constructs a new TapToFocus instance. The focus strategy can be changed in the CameraSettings through focusGestureStrategy.

jsonString
open var jsonString: String { get }

Added in version 6.7.0

Implemented from FocusGesture. See FocusGesture.jsonString.

showUIIndicator
open var showUIIndicator: Bool { get, set }

Added in version 6.19.0

If enabled triggering the focus gesture will also show a visual indicator. Defaults to true.