MLKitTextRecognition Framework Reference

  • TextRecognitionCallback is a type definition used to handle the results of text recognition.

  • It includes parameters for the recognized text (MLKText) and any potential errors encountered during the process.

  • This typealias is utilized within the context of the MLKTextRecognizer class and its text recognition functionality.

Type Definitions

The following type definitions are available globally.

  • The callback to invoke when the text recognition completes.

    Declaration

    Swift

    typealias TextRecognitionCallback = (MLKText?, Error?) -> Void

    Parameters

    text

    Recognized Text in the image or nil if there was an error.

    error

    The error or nil.