Spotlight Viewfinder

Defined in framework ScanditDataCaptureCore

Deprecated since version 6.8.0: Use SDCRectangularViewfinder with style SDCRectangularViewfinderStyleRounded or SDCRectangularViewfinderStyleSquare and non-zero dimming instead.

SDCSpotlightViewfinder
@interface SDCSpotlightViewfinder : NSObject <SDCViewfinder>

Added in version 6.0.0

Spotlight viewfinder with an embedded Scandit logo. The spotlight is always centered on the point of interest of the view.

The spotlight viewfinder is always displayed but the color of the border around the spotlight changes depending on whether the data capture mode is enabled or not.

To use this viewfinder, create a new instance and assign it to the overlay, e.g. the barcode capture overlay by assigning to the SDCBarcodeCaptureOverlay.viewfinder property.

+ viewfinder
+ (nonnull instancetype)viewfinder

Added in version 6.0.0

Returns a new spotlight viewfinder with default parameters.

sizeWithUnitAndAspect
@property (nonatomic, readonly) SDCSizeWithUnitAndAspect *sizeWithUnitAndAspect

Added in version 6.0.0

The size and sizing mode of the viewfinder.

- setSize:
- (void)setSize:(SDCSizeWithUnit)size

Added in version 6.0.0

Sets the horizontal and vertical size of the viewfinder to the provided value. When the unit is relative (unit in either x or y is SDCMeasureUnitFraction) the size is computed relative to the view size minus the scan area margins.

- setWidth:aspectRatio:
- (void)setWidth:(SDCFloatWithUnit)width
     aspectRatio:(CGFloat)heightToWidthAspectRatio

Added in version 6.0.0

Sets the width of the viewfinder and compute height automatically based on the provided height/width aspect ratio. When the unit is relative (SDCMeasureUnitFraction), the width is computed relative to the view size minus the scan area margins.

- setHeight:aspectRatio:
- (void)setHeight:(SDCFloatWithUnit)height
      aspectRatio:(CGFloat)widthToHeightAspectRatio

Added in version 6.0.0

Sets the height of the viewfinder and compute width automatically based on the provided width/height aspect ratio. When the unit is relative (SDCMeasureUnitFraction), the height is computed relative to the view size minus the scan area margins.

enabledBorderColor
@property (nonatomic, strong, nonnull) UIColor *enabledBorderColor

Added in version 6.0.0

The color used to draw the spotlight border when the data capture mode is enabled.

disabledBorderColor
@property (nonatomic, strong, nonnull) UIColor *disabledBorderColor

Added in version 6.0.0

The color used to draw the spotlight border when the data capture mode is disabled.

backgroundColor
@property (nonatomic, strong, nonnull) UIColor *backgroundColor

Added in version 6.0.0

The color used to draw the darkened area surrounding the spotlight.