Zoom Switch Control

Defined in framework ScanditCaptureCore

ZoomSwitchControl
open class ZoomSwitchControl : NSObject, Control

Added in version 6.10.0

Control that allows switching between configurable camera zoom levels. The available zoom levels are filtered based on the camera hardware capabilities.

You can add this control to a view by calling DataCaptureView.addControl().

init
init()

Added in version 6.10.0

Initializes a new ZoomSwitchControl.

zoomedOutImage
open var zoomedOutImage: UIImage { get, set }

Added in version 6.10.0

Deprecated since version 8.4: This property is deprecated and will be removed in a future release.

The button image displayed when the zoom level is set to 1x.

zoomedOutPressedImage
open var zoomedOutPressedImage: UIImage { get, set }

Added in version 6.10.0

Deprecated since version 8.4: This property is deprecated and will be removed in a future release.

The button image displayed when the zoom level is set to 1x and the button is pressed.

zoomedInImage
open var zoomedInImage: UIImage { get, set }

Added in version 6.10.0

Deprecated since version 8.4: This property is deprecated and will be removed in a future release.

The button image displayed when the zoom level is set to 2x.

zoomedInPressedImage
open var zoomedInPressedImage: UIImage { get, set }

Added in version 6.10.0

Deprecated since version 8.4: This property is deprecated and will be removed in a future release.

The button image displayed when the zoom level is set to 2x and pressed.

defaultZoomedOutImage
open class var defaultZoomedOutImage: UIImage { get }

Added in version 6.10.0

Deprecated since version 8.4: This property is deprecated and will be removed in a future release.

The default button image displayed when the zoom level is set to 1x.

defaultZoomedOutPressedImage
open class var defaultZoomedOutPressedImage: UIImage { get }

Added in version 6.10.0

Deprecated since version 8.4: This property is deprecated and will be removed in a future release.

The default button image displayed when the zoom level is set to 1x and the button is pressed.

defaultZoomedInImage
open class var defaultZoomedInImage: UIImage { get }

Added in version 6.10.0

Deprecated since version 8.4: This property is deprecated and will be removed in a future release.

The default button image displayed when the zoom level is set to 2x.

defaultZoomedInPressedImage
open class var defaultZoomedInPressedImage: UIImage { get }

Added in version 6.10.0

Deprecated since version 8.4: This property is deprecated and will be removed in a future release.

The default button image displayed when the zoom level is set to 2x and pressed.

accessibilityLabelWhenZoomedOut
open var accessibilityLabelWhenZoomedOut: String? { get, set }

Added in version 7.4.1

Deprecated since version 8.4: Use accessibilityLabel instead.

Accessibility label text used for the control button when zoomed out (iOS only).

accessibilityLabelWhenZoomedIn
open var accessibilityLabelWhenZoomedIn: String? { get, set }

Added in version 7.4.1

Deprecated since version 8.4: Use accessibilityLabel instead.

Accessibility label text used for the control button when zoomed in (iOS only).

accessibilityHintWhenZoomedOut
open var accessibilityHintWhenZoomedOut: String? { get, set }

Added in version 7.4.1

Deprecated since version 8.4: Use accessibilityHint instead.

Accessibility hint text used for the control button when zoomed out.

accessibilityHintWhenZoomedIn
open var accessibilityHintWhenZoomedIn: String? { get, set }

Added in version 7.4.1

Deprecated since version 8.4: Use accessibilityHint instead.

Accessibility hint text used for the control button when zoomed in.

orientation
open var orientation: ZoomSwitchOrientation { get, set }

Added in version 8.4.0

The orientation of the zoom switch control. Defaults to ZoomSwitchOrientation.`default`.

isAlwaysExpanded
open var isAlwaysExpanded: Bool { get, set }

Added in version 8.4.0

When true, the control is always shown in its expanded state, displaying all zoom levels regardless of user interaction, and isExpanded is always true. When false, the control can be collapsed. Defaults to false.

isExpanded
open var isExpanded: Bool { get, set }

Added in version 8.4.0

Whether the control is currently expanded, showing all zoom levels. Can be set programmatically to expand or collapse the control. When isAlwaysExpanded is true, this property always returns true and setting it has no effect.

selectedZoomLevel
open var selectedZoomLevel: CGFloat { get }

Added in version 8.4.0

The currently selected zoom level.

accessibilityLabel
open var accessibilityLabel: String { get, set }

Added in version 8.4.0

The accessibility label. The placeholder <level> is replaced with the zoom factor of each button. Defaults to "Zoom <level>".

accessibilityHint
open var accessibilityHint: String { get, set }

Added in version 8.4.0

The accessibility hint. Defaults to "Adjusts the camera zoom level".

selectZoomLevel
open func selectZoomLevel(_ zoomLevel: CGFloat) -> CGFloat

Added in version 8.4.0

Selects the given zoom level, clamped to the range supported by the camera hardware. Returns the actual zoom level that was applied.

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

Added in version 6.18.0

Deprecated since version 8.4: Use Camera.addZoomListener() instead. Will be removed in 9.0.

Adds the listener to this control.

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

Added in version 6.18.0

Deprecated since version 8.4: Use Camera.removeZoomListener() instead. Will be removed in 9.0.

Removes a previously added listener from this control.