ScanView
@MainActor
open class ScanView : UIView
扫码视图
-
当前配置
Declaration
Swift
@MainActor open private(set) var configuration: ScanViewConfiguration { get }
-
辅助扫描边框区域的frame
默认x为:0.5 * (self.frame.size.width - w) 默认y为:0.5 * (self.frame.size.height - w) 默认width和height为:0.7 * self.frame.size.width
Declaration
Swift
@MainActor open var borderFrame: CGRect
-
扫描区域的frame
Declaration
Swift
@MainActor open var scanFrame: CGRect { get set }
-
双击回调方法
Declaration
Swift
@MainActor open var doubleTapBlock: ((Bool) -> Void)? { get set }
-
缩放回调方法,0表示开始
Declaration
Swift
@MainActor open var pinchScaleBlock: ((CGFloat) -> Void)? { get set }
-
对象方法创建 ScanView
Declaration
Swift
@MainActor public init(frame: CGRect, configuration: ScanViewConfiguration)
Parameters
frame
ScanView 的 frame
configuration
ScanView 的配置
-
Undocumented
Declaration
Swift
@MainActor override public init(frame: CGRect)
-
Undocumented
Declaration
Swift
@MainActor public required init?(coder: NSCoder)
-
Undocumented
Declaration
Swift
@MainActor override open func draw(_ rect: CGRect)
-
开始扫描
Declaration
Swift
@MainActor open func startScanning()
-
停止扫描
Declaration
Swift
@MainActor open func stopScanning()