PTAnnotationViewControllerDelegate

@protocol PTAnnotationViewControllerDelegate <NSObject>

The methods declared by the PTAnnotationViewControllerDelegate protocol allow the adopting delegate to respond to messages from the PTAnnotationViewController class.

  • Tells the delegate that an annotation in the list was selected.

    Declaration

    Objective-C

    - (void)annotationViewController:
                (nonnull PTAnnotationViewController *)annotationViewController
                   selectedAnnotaion:(nonnull NSDictionary *)anAnnotation;

    Swift

    optional func annotationViewController(_ annotationViewController: PTAnnotationViewController, selectedAnnotaion anAnnotation: [AnyHashable : Any])

    Parameters

    annotationViewController

    The PTAnnotationViewController object informing the delegate about the annotation’s selection.

    anAnnotation

    A dictionary of bookmark information, with key-value pairs: {KEY_PAGENUM, NSNumber of the page number that the annotation is on}, {KEY_SUBTYPE, NSString of the annotation subtype}, {KEY_TYPE, NSString of the annotation type}, {KEY_RECT, PTPDFRect of the annotation’s bounding box, in page coordinates}, {KEY_CONTENTS, NSString of the content’s of the annotation’s popup note, {KEY_OBJNUM, NSNumber of the annotation’s SDF object number}.

  • Tells the delegate that the annotation control wants to be closed.

    Declaration

    Objective-C

    - (void)annotationViewControllerDidCancel:
        (nonnull PTAnnotationViewController *)annotationViewController;

    Swift

    optional func annotationViewControllerDidCancel(_ annotationViewController: PTAnnotationViewController)
  • Raised when the annotation view controller removes an annotation.

    Declaration

    Objective-C

    - (void)annotationViewController:
                (nonnull PTAnnotationViewController *)annotationViewController
                   annotationRemoved:(nonnull PTAnnot *)annotation
                        onPageNumber:(unsigned long)pageNumber;

    Swift

    optional func annotationViewController(_ annotationViewController: PTAnnotationViewController, annotationRemoved annotation: PTAnnot, onPageNumber pageNumber: UInt)