Rectangular Viewfinder
Defined in framework ScanditDataCaptureCore
- SDCRectangularViewfinderStyle
Added in version 6.8.0
The style of the SDCRectangularViewfinder.
- SDCRectangularViewfinderStyleSquare
Added in version 6.8.0
New style from version 6.8 onwards with square corners.
- SDCRectangularViewfinderStyleRounded
Added in version 6.8.0
New style from version 6.8 onwards with rounded corners.
- SDCRectangularViewfinderLineStyle
Added in version 6.8.0
The style of the lines drawn as part of the SDCRectangularViewfinder.
- SDCRectangularViewfinderLineStyleBold
Added in version 6.8.0
Draws lines with a width of 5 dips/points.
- SDCRectangularViewfinderLineStyleLight
Added in version 6.8.0
Draws lines with a width of 3 dips/points.
- SDCRectangularViewfinder
@interface SDCRectangularViewfinder : NSObject <SDCViewfinder>
Added in version 6.0.0
Rectangular viewfinder with an embedded Scandit logo. The rectangle is always centered on the point of interest of the view.
The rectangular viewfinder is displayed when the recognition is active and hidden when it is not.
To use this viewfinder, create a new instance and assign it to the overlay, e.g. the barcode capture overlay via the SDCBarcodeCaptureOverlay.viewfinder property.
- + viewfinderWithStyle:lineStyle:
+ (nonnull
instancetype
)viewfinderWithStyle:(SDCRectangularViewfinderStyle)style lineStyle:(SDCRectangularViewfinderLineStyle)lineStyleAdded in version 6.8.0
Constructs a new rectangular viewfinder with the specified style and line style.
- + viewfinderWithStyle:
+ (nonnull
instancetype
)viewfinderWithStyle:(SDCRectangularViewfinderStyle)styleAdded in version 6.8.0
Constructs a new rectangular viewfinder with the specified style and SDCRectangularViewfinderLineStyleLight.
- style
@property (nonatomic, readonly) SDCRectangularViewfinderStyle style
Added in version 6.8.0
The style of the viewfinder.
- lineStyle
@property (nonatomic, readonly) SDCRectangularViewfinderLineStyle lineStyle
Added in version 6.8.0
The style of the viewfinder’s lines.
- color
@property (nonatomic, strong, nonnull) UIColor *color
Added in version 6.0.0
The color used to draw the logo and viewfinder when the mode is enabled. The color is always used at full opacity, changing the alpha value has no effect.
- disabledColor
@property (nonatomic, strong, nonnull) UIColor *disabledColor
Added in version 6.3.0
The color used to draw the logo and viewfinder when the mode is disabled. By default transparent.
- dimming
@property (nonatomic, assign) CGFloat dimming
Added in version 6.8.0
The amount the area outside the viewfinder’s rectangle is dimmed by. Accepts values between 0 (no dimming) and 1 (fully blacked out).
- disabledDimming
@property (nonatomic, assign) CGFloat disabledDimming
Added in version 6.10.0
The amount the area outside the viewfinder’s rectangle is dimmed by when the mode is disabled. Accepts values between 0 (no dimming) and 1 (fully blacked out).
- animation
@property (nonatomic, strong, nullable) SDCRectangularViewfinderAnimation *animation
Added in version 6.8.0
The animation used for the viewfinder, if any.
- sizeWithUnitAndAspect
@property (nonatomic, readonly) SDCSizeWithUnitAndAspect *sizeWithUnitAndAspect
Added in version 6.0.0
The size and sizing mode of the viewfinder.
- - setSize:
- (
void
)setSize:(SDCSizeWithUnit)sizeAdded 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)heightToWidthAspectRatioAdded 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)widthToHeightAspectRatioAdded 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.
- - setShorterDimension:aspectRatio:
- (
void
)setShorterDimension:(CGFloat)fraction aspectRatio:(CGFloat)aspectRatioAdded in version 6.8.0
Sets the viewfinder size on the short side of the scan area as fraction of the scan area size. The size on the long side is calculated based on the provided short side/long side aspectRatio.
- NSStringFromRectangularViewfinderStyle(style)
NSString *_Nonnull NSStringFromRectangularViewfinderStyle(SDCRectangularViewfinderStyle style)
Added in version 6.8.0
Serialize the viewfinder style in a JSON string.
- NSStringFromRectangularViewfinderLineStyle(style)
NSString *_Nonnull NSStringFromRectangularViewfinderLineStyle(SDCRectangularViewfinderLineStyle style)
Added in version 6.8.0
Serialize the viewfinder line style in a JSON string.