Tài liệu tham khảo về khung MLKitBarcodeScanning

Định nghĩa loại

Các định nghĩa loại sau đây có sẵn trên toàn cầu.

  • @enum BarcodeValueType Định dạng giá trị của mã vạch. Ví dụ: TEXT, SẢN PHẨM, URL, v.v.

    Khai báo

    Swift

    struct BarcodeValueType : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
  • @enum BarcodeAddressType Loại địa chỉ.

    Khai báo

    Swift

    struct BarcodeAddressType : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
  • @enum BarcodeEmailType Loại email dành cho BarcodeEmail.

    Khai báo

    Swift

    struct BarcodeEmailType : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
  • @enum BarcodePhoneType Loại điện thoại dành cho BarcodePhone.

    Khai báo

    Swift

    struct BarcodePhoneType : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
  • @enum BarcodeWiFi encryptedType Loại mã hóa Wi-Fi cho BarcodeWiFi.

    Khai báo

    Swift

    struct BarcodeWiFiEncryptionType : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
  • Một khối chứa một mảng mã vạch hoặc nil nếu có lỗi.

    Khai báo

    Swift

    typealias BarcodeScanningCallback = ([MLKBarcode]?, Error?) -> Void

    Các tham số

    barcodes

    Mảng mã vạch được quét trong hình ảnh hoặc nil nếu có lỗi.

    error

    Lỗi hoặc nil.