MLKitTextRecognitionCommon Framework Reference

MLKTextLine


@interface MLKTextLine : NSObject

A text line recognized in an image that consists of an array of elements.

  • String representation of the text line that was recognized.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSString *_Nonnull text;
  • An array of text elements that make up the line.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSArray<MLKTextElement *> *_Nonnull elements;
  • The rectangle that contains the text line relative to the image in the default coordinate space.

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGRect frame;
  • An array of recognized languages in the text line. If no languages were recognized, the array is empty.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSArray<MLKTextRecognizedLanguage *> *_Nonnull recognizedLanguages;
  • The four corner points of the text line in clockwise order starting with the top left point relative to the image in the default coordinate space. The NSValue objects are CGPoints.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSArray<NSValue *> *_Nonnull cornerPoints;
  • Unavailable.

    Declaration

    Objective-C

    - (nonnull instancetype)init;