PSPDFFreeTextAnnotationView

Objective-C


@interface PSPDFFreeTextAnnotationView
    : PSPDFHostingAnnotationView <UITextViewDelegate, PSPDFOverridable>

Swift

class FreeTextAnnotationView : HostingAnnotationView, UITextViewDelegate, Overridable

Free Text View. Allows inline text editing.

  • Starts editing; shows the keyboard.

    Declaration

    Objective-C

    - (BOOL)beginEditing;

    Swift

    func beginEditing() -> Bool

    Return Value

    YES if editing was able to be started, NO otherwise. This can happen in cases where the annotation is locked/has contents locked.

  • Ends editing; hides the keyboard.

    Declaration

    Objective-C

    - (void)endEditing;

    Swift

    func endEditing()
  • Internally used textView. Only valid during begin and before endEditing.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) UITextView *textView;

    Swift

    var textView: UITextView? { get }
  • The dragging view, if we are currently dragged.

    Declaration

    Objective-C

    @property (nonatomic, weak) PSPDFResizableView *_Nullable resizableView;

    Swift

    weak var resizableView: PSPDFResizableView? { get set }
  • Creates a textView on the fly once we enter edit mode.

    Subclass to create a different text view. Every call to this method will create a new text view. Do not call directly. Only intended to subclass.

    Declaration

    Objective-C

    - (nonnull UITextView *)textViewForEditing;

    Swift

    func textViewForEditing() -> UITextView