PSPDFDocumentEditorDelegate

Objective-C

@protocol PSPDFDocumentEditorDelegate <NSObject>

Swift

protocol PDFDocumentEditorDelegate : NSObjectProtocol

Delegate that can be implemented to be notified of changes that the document editor performs.

  • This delegate call is is called in response to a reset call and when external document changes are detected. After receiving this call, you should remove any cached data and do a full UI reload.

    Declaration

    Objective-C

    - (void)documentEditorRequestsFullReload:(nonnull PSPDFDocumentEditor *)editor;

    Swift

    func documentEditorRequestsFullReload(_ editor: PDFDocumentEditor)

    Parameters

    editor

    A reference to the document editor responsible for the changes.

  • Called whenever a document operation performs incremental changes. Use the provided PSPDFEditingChange objects to update any attached UI or do a full reload.

    This call is not needed, if you instead use the changes retuned by the individual update methods.

    Declaration

    Objective-C

    - (void)documentEditor:(nonnull PSPDFDocumentEditor *)editor
         didPerformChanges:(nonnull NSArray<PSPDFEditingChange *> *)changes;

    Swift

    optional func documentEditor(_ editor: PDFDocumentEditor, didPerform changes: [PDFEditingChange])

    Parameters

    editor

    A reference to the document editor responsible for the changes.

    changes

    An array of changes that can be used for incremental UI updates.