class: QRScan

二维码和条形码扫描

QRScanDelegate

  • scanOutputResult(outputStr:String)
    获取扫描结果

property

  • scanAnimationDuration
    扫描时长,默认3.0f

使用注意

  在info.plist 中添加位置服务权限
  <!-- 相机 --> 
  <key> NSCameraUsageDescription </key> 
  <string>App需要您的同意,才能访问相机</string>

使用

let scan = QRScan()
scan.delegate = self
navigationController?.pushViewController(scan, animated: true)
// MARK: - QRScanDelegate
func scanOutputResult(outputStr: String) {
    // get result
}

results matching ""

    No results matching ""