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

Định nghĩa kiểu

Các định nghĩa về 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ụ: VĂN BẢN, 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 cho BarcodeEmail.

    Khai báo

    Swift

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

    Khai báo

    Swift

    struct BarcodePhoneType : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
  • @enum BarcodeWiFiEncodingType Loại mã hoá 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

    Tham số

    barcodes

    Một 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.