MLKitBarcodeScanning 框架参考

类型定义

以下类型定义可在全局范围内使用。

  • @enum BarcodeValueType 条形码的值格式。例如,TEXT、PRODUCT、网址 等。

    声明

    Objective-C

    typedef NSInteger MLKBarcodeValueType
  • @enum BarcodeAddressType 地址类型。

    声明

    Objective-C

    typedef NSInteger MLKBarcodeAddressType
  • @enum BarcodeEmailType BarcodeEmail 的电子邮件类型。

    声明

    Objective-C

    typedef NSInteger MLKBarcodeEmailType
  • @enum BarcodePhoneType BarcodePhone 的电话号码类型。

    声明

    Objective-C

    typedef NSInteger MLKBarcodePhoneType
  • @enum BarcodeWiFiEncryptionType BarcodeWiFi 的 Wi-Fi 加密类型。

    声明

    Objective-C

    typedef NSInteger MLKBarcodeWiFiEncryptionType
  • 包含条形码数组的块,如果出现错误,则返回 nil

    声明

    Objective-C

    typedef void (^MLKBarcodeScanningCallback)(NSArray<MLKBarcode *> *_Nullable,
                                               NSError *_Nullable)

    参数

    barcodes

    在图片中扫描的条形码数组;如果出现错误,则返回 nil

    error

    错误或 nil