UIQRScanView

public final class UIQRScanView: UIView, AVCaptureMetadataOutputObjectsDelegate

The UIRegistrationQRView enables mobile application to scan a QR code for device registration.

  • Returns an object initialized from data in a given unarchiver.

    Declaration

    Swift

    required public init?(coder aDecoder: NSCoder)
  • Draws the receiver’s image within the passed-in rectangle.

    Declaration

    Swift

    override public func draw(_ rect: CGRect)
  • The outline color when the QR scan is not matached.

    Remark

    Default value is UIColor(red:1.00, green:0.31, blue:0.31, alpha:0.75)

    Declaration

    Swift

    @IBInspectable public var scanNoMatchColor: UIColor = UIColor(red:1.00, green:0.31, blue:0.31, alpha:0.75)
  • The outline color when the QR scan is matached.

    Remark

    Default value is UIColor(red:0.25, green:0.47, blue:0.75, alpha:0.75)

    Declaration

    Swift

    @IBInspectable public var scanMatchColor: UIColor = UIColor(red:0.25, green:0.47, blue:0.75, alpha:0.75)
  • The width of the QR scan border.

    Remark

    Default value is 3.0.

    Declaration

    Swift

    @IBInspectable public var scanOutlineWidth: CGFloat = 3.0
  • Tells the view that a subview is about to be removed.

    Declaration

    Swift

    override public func willRemoveSubview(_ subview: UIView)
  • Start the camera capture.

    Declaration

    Swift

    public func startCapture()
  • Stop the camera capture.

    Declaration

    Swift

    public func stopCapture()
  • Informs the delegate that the capture output object emitted new metadata objects. The AVCaptureMetadataOutput object emits only metadata objects whose types are included in its metadataObjectTypes property.

    Remark

    The AVMetadataObject is set to an instance generated from QR codes.

    Declaration

    Swift

    public func metadataOutput(_ output: AVCaptureMetadataOutput, didOutput metadataObjects: [AVMetadataObject], from connection: AVCaptureConnection)