PSPDFAnnotationProviderChangeNotifier

Objective-C

@protocol PSPDFAnnotationProviderChangeNotifier <NSObject>

Swift

protocol AnnotationProviderChangeNotifier : NSObjectProtocol

To be notified on any changes PSPDFKit does on your annotations, implement this notifier. It will be set as soon as your class is added to the annotationManager.

  • Call this from your code as soon as annotations change. This method can be called from any thread. (try to avoid the main thread)

    Warning

    Don’t dynamically change the value that isOverlay returns, else you’ll confuse the updater.

    Declaration

    Objective-C

    - (void)updateAnnotations:(nonnull NSArray<PSPDFAnnotation *> *)annotations
                     animated:(BOOL)animated;

    Swift

    func update(_ annotations: [PSPDFAnnotation], animated: Bool)
  • Query to get the document provider if this annotation provider is attached to the PSPDFAnnotationManager.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) PSPDFDocumentProvider *parentDocumentProvider;

    Swift

    var parentDocumentProvider: PSPDFDocumentProvider? { get }