MLKitImageLabelingCommon Framework Reference

  • ImageLabelingCallback is a type definition in Swift that represents a block of code executed when image labeling is complete.

  • This callback provides an array of MLKImageLabel objects containing labeling results and an optional Error object indicating any errors during the process.

Type Definitions

The following type definitions are available globally.

  • A block containing an array of label results or nil if there’s an error.

    Declaration

    Swift

    typealias ImageLabelingCallback = ([MLKImageLabel]?, Error?) -> Void

    Parameters

    labels

    Array of label results in the image or nil if there was an error.

    error

    The error or nil.