PSPDFAnnotationView

Objective-C


@interface PSPDFAnnotationView : UIView <PSPDFAnnotationPresenting>

Swift

class AnnotationView : UIView, AnnotationPresenting

Generic annotation view that listens on annotation changes.

  • The currently set annotation.

    Declaration

    Objective-C

    @property (nonatomic, nullable) PSPDFAnnotation *annotation;

    Swift

    var annotation: Annotation? { get set }
  • Associated weak reference to the PDFPageView the annotation is displayed on.

    Declaration

    Objective-C

    @property (nonatomic, weak) PSPDFPageView *_Nullable pageView;

    Swift

    weak var pageView: PSPDFPageView? { get set }
  • Allows adapting to the outer zoomScale. Re-set after zooming.

    Declaration

    Objective-C

    @property (nonatomic) CGFloat zoomScale;

    Swift

    var zoomScale: CGFloat { get set }
  • Called when any annotation changes.

    Declaration

    Objective-C

    - (void)annotationChangedNotification:(nonnull NSNotification *)notification;

    Swift

    func annotationChangedNotification(_ notification: Notification)
  • Animated change notifications. Defaults to YES.

    Declaration

    Objective-C

    @property (nonatomic) BOOL shouldAnimatedAnnotationChanges;

    Swift

    var shouldAnimatedAnnotationChanges: Bool { get set }
  • Triggers a frame recalculation. Usually only called when the annotation is set.

    Declaration

    Objective-C

    - (void)updateFrame;

    Swift

    func updateFrame()