SBSDKBaseScannerZoomConfiguration
@interface SBSDKBaseScannerZoomConfiguration : NSObject
The zoom configuration object for a ‘SBSDKBaseScannerViewController’ and its subclasses. ‘SBSDKBaseScannerViewController’ and subclasses allow the user to zoom the camera. This class lets you customize the zooming user experience.
-
The range (min and max factor) of the cameras zoom factor. Default value is (1.0; 12.0).
Declaration
Objective-C
@property (nonatomic, strong, nullable) SBSDKZoomRange *zoomRange;
Swift
var zoomRange: SBSDKZoomRange? { get set }
-
The initial zoom factor. Must be in the range of (0.0 - 1.0), where 0.0 equals to the lower limit of zoomRange and 1.0 equals to the upper limit of zoomRange. Default value is 0.0.
Declaration
Objective-C
@property (nonatomic) CGFloat initialZoomFactor;
Swift
var initialZoomFactor: CGFloat { get set }
-
When this property is set to YES, the zoom can be toggled between the minimum and maximum zoom factor, defined in the zoomRange property, by just double-tapping anywhere in the base scanner view controllers view. If set to NO, zooming by double-tapping will be disabled. Defaults to YES.
Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isDoubleTapToZoomEnabled) BOOL doubleTapToZoomEnabled;
Swift
var isDoubleTapToZoomEnabled: Bool { get set }
-
When this property is set to YES, the camera zoom can be controlled by a pinch gesture anywhere in the base scannner view controllers view. If set to NO, zooming by pinching will be disabled. Defaults to YES.
Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isPinchToZoomEnabled) BOOL pinchToZoomEnabled;
Swift
var isPinchToZoomEnabled: Bool { get set }
-
Defines, if zooming in or out should be animated. This applies to double-tap zooming as well as to programmatically triggered zooms. Defaults to YES.
Declaration
Objective-C
@property (nonatomic) BOOL shouldAnimateZooming;
Swift
var shouldAnimateZooming: Bool { get set }
-
This is the default configuration with the properties initialized as mentioned in their description.
Declaration
Objective-C
+ (nonnull instancetype)defaultConfiguration;
Swift
class func `default`() -> Self
Return Value
The default zoom configuration object which can be changed and then passed back to the base scanner view controller.