PTFreeTextCreate

@interface PTFreeTextCreate : PTTool <UITextViewDelegate>

Creates a free text annotation.

  • The UITextView instance used for interactive text entry.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) UITextView *textView;

    Swift

    var textView: UITextView? { get set }
  • Commits the free text annotation to the document.

    Declaration

    Objective-C

    - (void)commitAnnotation;

    Swift

    func commitAnnotation()
  • Creates a free text annotation from the tool’s current state.

    Declaration

    Objective-C

    - (nonnull PTFreeText *)createFreeText;

    Swift

    func createFreeText() -> PTFreeText

    Return Value

    a new PTFreeText instance for the current document

  • Sets the rect of the free text annotation.

    Declaration

    Objective-C

    - (void)setRectForFreeText:(nonnull PTFreeText *)freeText;

    Swift

    func setRectFor(_ freeText: PTFreeText)

    Parameters

    freeText

    the free text annotation

  • Applies the text color, border appearance, and other properties to the free text annotation before it is committed.

    Declaration

    Objective-C

    - (void)setPropertiesForFreeText:(nonnull PTFreeText *)freeText;

    Swift

    func setPropertiesFor(_ freeText: PTFreeText)

    Parameters

    freeText

    the free text annotation

  • Sets the rect for a PTFreeText annotation.

    Declaration

    Objective-C

    + (void)setRectForFreeText:(nonnull PTFreeText *)freeText
                      withRect:(nonnull PTPDFRect *)rect
                   pdfViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl
                         isRTL:(BOOL)isRTL;

    Swift

    class func setRectFor(_ freeText: PTFreeText, with rect: PTPDFRect, pdfViewCtrl: PTPDFViewCtrl, isRTL: Bool)

    Parameters

    freeText

    The PTFreeText object.

    rect

    The PTPDFRect representation of the associated UITextView.

    pdfViewCtrl

    The PTPDFViewCtrl object.

    isRTL

    A BOOL indicating whether the text is in a right-to-left language.

  • Sets the free text appearance as is rendered by the iOS UI.

    Declaration

    Objective-C

    + (void)refreshAppearanceForAnnot:(nonnull PTFreeText *)freeText
                                onDoc:(nonnull PTPDFDoc *)doc;

    Swift

    class func refreshAppearance(forAnnot freeText: PTFreeText, on doc: PTPDFDoc)