Rectangular Viewfinder#
Defined in framework ScanditCaptureCore
-
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 by assigning to the SDCBarcodeCaptureOverlay.viewfinder property.
-
+ viewfinder
# + (nonnull
instancetype
)viewfinderAdded in version 6.0.0
-
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.
-
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.
-