PSPDFAnnotationViewProtocol

@protocol PSPDFAnnotationViewProtocol <NSObject>

Conforming to this protocol indicates instances can present an annotation and react events such as page show/hide (to pause video, for example)

  • Represented annotation this object is presenting.

    Declaration

    Objective-C

    @optional
    @property (assign, readwrite, nonatomic, nullable) PSPDFAnnotation *annotation;

    Swift

    optional var annotation: PSPDFAnnotation? { get set }
  • Allows ordering of annotation views.

    Declaration

    Objective-C

    @optional
    @property (assign, readwrite, nonatomic) NSUInteger zIndex;

    Swift

    optional var zIndex: UInt { get set }
  • Allows adapting to the outer zoomScale. Re-set after zooming.

    Declaration

    Objective-C

    @optional
    @property (assign, readwrite, nonatomic) CGFloat zoomScale;

    Swift

    optional var zoomScale: CGFloat { get set }
  • Allows adapting to the initial pdfScale

    Declaration

    Objective-C

    @optional
    @property (assign, readwrite, nonatomic) CGFloat PDFScale;

    Swift

    optional var pdfScale: CGFloat { get set }
  • Called when pageView is displayed.

    Declaration

    Objective-C

    - (void)didShowPageView:(nonnull PSPDFPageView *)pageView;

    Swift

    optional func didShow(_ pageView: PSPDFPageView)
  • Called when pageView is hidden.

    Declaration

    Objective-C

    - (void)didHidePageView:(nonnull PSPDFPageView *)pageView;

    Swift

    optional func didHide(_ pageView: PSPDFPageView)
  • Called initially and when the parent page size is changed. (e.g. rotation)

    Declaration

    Objective-C

    - (void)didChangePageBounds:(CGRect)bounds;

    Swift

    optional func didChangePageBounds(_ bounds: CGRect)
  • Called when the user taps on an annotation and the tap wasn’t processed otherwise.

    Declaration

    Objective-C

    - (void)didTapAtPoint:(CGPoint)point;

    Swift

    optional func didTap(at point: CGPoint)
  • Queries the view if removing should be in sync or happen instantly. If not implemented, return YES is assumed.

    Declaration

    Objective-C

    @optional
    @property (readonly, nonatomic) BOOL shouldSyncRemovalFromSuperview;

    Swift

    optional var shouldSyncRemovalFromSuperview: Bool { get }
  • View is queued for being removed, but still waits for a page sync. This is called regardless of what is returned in shouldSyncRemovalFromSuperview.

    Declaration

    Objective-C

    - (void)willRemoveFromSuperview;

    Swift

    optional func willRemoveFromSuperview()
  • A weak reference to the page view responsible for this view.

    Declaration

    Objective-C

    @optional
    @property (readwrite, nonatomic) PSPDFPageView *_Nullable pageView;

    Swift

    weak optional var pageView: PSPDFPageView? { get set }
  • A reference to the used configuration.

    Declaration

    Objective-C

    @optional
    @property (assign, readwrite, nonatomic)
        PSPDFConfiguration *_Nonnull configuration;

    Swift

    optional var configuration: PSPDFConfiguration { get set }
  • Indicates if the view is selected.

    Declaration

    Objective-C

    @optional
    @property (getter=isSelected, assign, readwrite, nonatomic) BOOL selected;

    Swift

    optional var isSelected: Bool { get set }