PTAnnotationViewControllerDelegate
@protocol PTAnnotationViewControllerDelegate <NSObject>
The methods declared by the PTAnnotationViewControllerDelegate
protocol allow the adopting
class to respond to messages from the PTAnnotationViewController
class.
-
This method is called when a view cell will be displayed in the
PTAnnotationViewController
.Declaration
Objective-C
- (void)annotationViewController: (nonnull PTAnnotationViewController *)annotationViewController willDisplayCell:(nonnull PTAnnotationViewCell *)cell forAnnotationModel:(nonnull id<PTAnnotationModel>)annotation;
Swift
optional func annotationViewController(_ annotationViewController: PTAnnotationViewController, willDisplay cell: PTAnnotationViewCell, for annotation: any PTAnnotationModel)
Parameters
annotationViewController
The annotation view controller that sent the message.
cell
The view cell that will be displayed.
annotation
The annotation model representing an annotation in the PDF document.
-
This method is called when an annotation is selected in the
PTAnnotationViewController
.Declaration
Objective-C
- (void)annotationViewController: (nonnull PTAnnotationViewController *)annotationViewController didSelectAnnotation:(nonnull PTAnnot *)annotation onPageNumber:(int)pageNumber;
Swift
optional func annotationViewController(_ annotationViewController: PTAnnotationViewController, didSelectAnnotation annotation: PTAnnot, onPageNumber pageNumber: Int32)
Parameters
annotationViewController
The annotation view controller that sent the message
annotation
The PDF annotation that was selected
pageNumber
The PDF page number of the selected annotation