ScanView

open class ScanView : UIView

扫码视图

Accessor

  • 当前配置

    Declaration

    Swift

    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

    open var borderFrame: CGRect
  • 扫描区域的frame

    Declaration

    Swift

    open var scanFrame: CGRect { get set }
  • 双击回调方法

    Declaration

    Swift

    open var doubleTapBlock: ((Bool) -> Void)? { get set }
  • 缩放回调方法,0表示开始

    Declaration

    Swift

    open var pinchScaleBlock: ((CGFloat) -> Void)? { get set }

Lifecycle

  • 对象方法创建 ScanView

    Declaration

    Swift

    public init(frame: CGRect, configuration: ScanViewConfiguration)

    Parameters

    frame

    ScanView 的 frame

    configuration

    ScanView 的配置

  • Undocumented

    Declaration

    Swift

    public override init(frame: CGRect)
  • Undocumented

    Declaration

    Swift

    public required init?(coder: NSCoder)
  • Undocumented

    Declaration

    Swift

    open override func draw(_ rect: CGRect)

Public

  • 开始扫描

    Declaration

    Swift

    open func startScanning()
  • 停止扫描

    Declaration

    Swift

    open func stopScanning()