PTToolManagerObserver
@protocol PTToolManagerObserver <NSObject>
Instances of classes conforming to the PTToolManagerObserver protocol can be notified of changes
in the tool manager.
-
Notifies the observer that the tool manager’s tool will change.
Declaration
Objective-C
- (void)toolManager:(nonnull PTToolManager *)toolManager willChangeToTool:(nullable PTTool *)newTool;Swift
optional func toolManager(_ toolManager: PTToolManager, willChangeTo newTool: PTTool?)Parameters
toolManagerThe tool manager whose tool will change
newToolThe tool that the tool manager will change to
-
Notifies the observer that the tool manager’s tool has changed.
Declaration
Objective-C
- (void)toolManager:(nonnull PTToolManager *)toolManager didChangeFromTool:(nullable PTTool *)previousTool;Swift
optional func toolManager(_ toolManager: PTToolManager, didChangeFrom previousTool: PTTool?)Parameters
toolManagerThe tool manager whose tool changed
previousToolThe previous tool, or
nilif there was no previous tool
-
Raised when the tools code selects an annotation.
Declaration
Objective-C
- (void)toolManager:(nonnull PTToolManager *)toolManager didSelectAnnotation:(nonnull PTAnnot *)annotation onPageNumber:(int)pageNumber;Swift
optional func toolManager(_ toolManager: PTToolManager, didSelectAnnotation annotation: PTAnnot, onPageNumber pageNumber: Int32)Parameters
toolManagerThe tool manager.
annotationThe annotation that was selected.
pageNumberThe page number of the PDF that the annotation was selected on.
-
This method is called when text has been copied to the specified pasteboard.
Declaration
Objective-C
- (void)toolManager:(nonnull PTToolManager *)toolManager didCopyText:(nullable NSString *)copiedText toPasteboard:(nonnull UIPasteboard *)pasteboard;Swift
optional func toolManager(_ toolManager: PTToolManager, didCopyText copiedText: String?, to pasteboard: UIPasteboard)Parameters
toolManagerThe tool manager sending the message
copiedTextThe text that was added to the pasteboard
pasteboardThe pasteboard to which the text was added
-
Raised when the tools code adds an annotation
Declaration
Objective-C
- (void)toolManager:(nonnull PTToolManager *)toolManager annotationAdded:(nonnull PTAnnot *)annotation onPageNumber:(int)pageNumber;Swift
optional func toolManager(_ toolManager: PTToolManager, annotationAdded annotation: PTAnnot, onPageNumber pageNumber: Int32)Parameters
toolManagerThe tool manager.
annotationThe annotation that was added.
pageNumberThe page number of the PDF that the annotation was added to.
-
Raised before the tools code modifies an annotation
Declaration
Objective-C
- (void)toolManager:(nonnull PTToolManager *)toolManager willModifyAnnotation:(nonnull PTAnnot *)annotation onPageNumber:(int)pageNumber;Swift
optional func toolManager(_ toolManager: PTToolManager, willModifyAnnotation annotation: PTAnnot, onPageNumber pageNumber: Int32)Parameters
toolManagerThe tool manager.
annotationThe annotation that will be modified.
pageNumberThe page number of the PDF that the annotation is on.
-
Raised when the tools code modifies an annotation
Declaration
Objective-C
- (void)toolManager:(nonnull PTToolManager *)toolManager annotationModified:(nonnull PTAnnot *)annotation onPageNumber:(int)pageNumber;Swift
optional func toolManager(_ toolManager: PTToolManager, annotationModified annotation: PTAnnot, onPageNumber pageNumber: Int32)Parameters
toolManagerThe tool manager.
annotationThe annotation that was modified.
pageNumberThe page number of the PDF that the annotation is on.
-
Raised before the tools code removes an annotation
Declaration
Objective-C
- (void)toolManager:(nonnull PTToolManager *)toolManager willRemoveAnnotation:(nonnull PTAnnot *)annotation onPageNumber:(int)pageNumber;Swift
optional func toolManager(_ toolManager: PTToolManager, willRemoveAnnotation annotation: PTAnnot, onPageNumber pageNumber: Int32)Parameters
toolManagerThe tool manager.
annotationThe annotation that will be removed.
pageNumberThe page number of the PDF that the annotation will be removed from.
-
Raised when the tools code removes an annotation
Declaration
Objective-C
- (void)toolManager:(nonnull PTToolManager *)toolManager annotationRemoved:(nonnull PTAnnot *)annotation onPageNumber:(int)pageNumber;Swift
optional func toolManager(_ toolManager: PTToolManager, annotationRemoved annotation: PTAnnot, onPageNumber pageNumber: Int32)Parameters
toolManagerThe tool manager.
annotationThe annotation that was removed.
pageNumberThe page number of the PDF that the annotation was removed from.
-
Raised before the tools code flattens an annotation. This will be called before the
willRemoveAnnotation:delegate method.Declaration
Objective-C
- (void)toolManager:(nonnull PTToolManager *)toolManager willFlattenAnnotation:(nonnull PTAnnot *)annotation onPageNumber:(int)pageNumber;Swift
optional func toolManager(_ toolManager: PTToolManager, willFlattenAnnotation annotation: PTAnnot, onPageNumber pageNumber: Int32)Parameters
toolManagerThe tool manager.
annotationThe annotation that will be flattened.
pageNumberThe page number of the PDF that the annotation will be flattened onto.
-
Raised when the tools code flattens an annotation. This will be called before the
annotationRemoved:delegate method.Declaration
Objective-C
- (void)toolManager:(nonnull PTToolManager *)toolManager annotationFlattened:(nonnull PTAnnot *)annotation onPageNumber:(int)pageNumber;Swift
optional func toolManager(_ toolManager: PTToolManager, annotationFlattened annotation: PTAnnot, onPageNumber pageNumber: Int32)Parameters
toolManagerThe tool manager.
annotationThe annotation that was flattened.
pageNumberThe page number of the PDF that the annotation was flattened onto.
-
Raised when the tools code modifies a form field annotation’s data
Declaration
Objective-C
- (void)toolManager:(nonnull PTToolManager *)toolManager formFieldDataModified:(nonnull PTAnnot *)annotation onPageNumber:(int)pageNumber;Swift
optional func toolManager(_ toolManager: PTToolManager, formFieldDataModified annotation: PTAnnot, onPageNumber pageNumber: Int32)Parameters
toolManagerThe tool manager.
annotationThe form field annotation that has modified data.
pageNumberThe page number of the PDF that the form field annotation is on.
-
Raised when a page has been added to the document.
Declaration
Objective-C
- (void)toolManager:(nonnull PTToolManager *)toolManager pageAddedForPageNumber:(int)pageNumber;Swift
optional func toolManager(_ toolManager: PTToolManager, pageAddedForPageNumber pageNumber: Int32)Parameters
toolManagerThe tool manager.
pageNumberThe page number of the page that was added.
-
Raised when a page has been moved in the document.
Declaration
Objective-C
- (void)toolManager:(nonnull PTToolManager *)toolManager pageMovedFromPageNumber:(int)oldPageNumber toPageNumber:(int)newPageNumber;Swift
optional func toolManager(_ toolManager: PTToolManager, pageMovedFromPageNumber oldPageNumber: Int32, toPageNumber newPageNumber: Int32)Parameters
toolManagerThe tool manager.
oldPageNumberThe old page number of the page.
newPageNumberThe new page number of the page.
-
Raised when a page has been removed from the document.
Declaration
Objective-C
- (void)toolManager:(nonnull PTToolManager *)toolManager pageRemovedForPageNumber:(int)pageNumber;Swift
optional func toolManager(_ toolManager: PTToolManager, pageRemovedForPageNumber pageNumber: Int32)Parameters
toolManagerThe tool manager.
pageNumberThe page number of the page that was removed.
-
Raised when pages will be rotated.
Declaration
Objective-C
- (void)toolManager:(nonnull PTToolManager *)toolManager willRotatePagesForPageNumbers:(nonnull NSIndexSet *)pageNumbers;Swift
optional func toolManager(_ toolManager: PTToolManager, willRotatePagesForPageNumbers pageNumbers: IndexSet)Parameters
toolManagerThe tool manager.
pageNumbersThe page numbers of the pages that will be rotated.
-
Raised when pages have been rotated.
Declaration
Objective-C
- (void)toolManager:(nonnull PTToolManager *)toolManager didRotatePagesForPageNumbers:(nonnull NSIndexSet *)pageNumbers;Swift
optional func toolManager(_ toolManager: PTToolManager, didRotatePagesForPageNumbers pageNumbers: IndexSet)Parameters
toolManagerThe tool manager.
pageNumbersThe page numbers of the pages that were rotated
-
Notifies the observer that the live-appearance view will be displayed for the specified annotation.
Declaration
Objective-C
- (void)toolManager:(nonnull PTToolManager *)toolManager willDisplayAppearanceView:(nonnull UIView *)appearanceView forAnnotation:(nonnull PTAnnot *)annotation onPageNumber:(int)pageNumber;Swift
optional func toolManager(_ toolManager: PTToolManager, willDisplayAppearanceView appearanceView: UIView, forAnnotation annotation: PTAnnot, onPageNumber pageNumber: Int32)Parameters
toolManagerThe tool manager.
appearanceViewThe annotation appearance view that will be displayed.
annotationThe annotation.
pageNumberThe page number of the annotation.
-
Notifies the observer that the live-appearance view is no longer being displayed for the specified annotation.
Declaration
Objective-C
- (void)toolManager:(nonnull PTToolManager *)toolManager didEndDisplayingAppearanceView:(nonnull UIView *)appearanceView forAnnotation:(nonnull PTAnnot *)annotation onPageNumber:(int)pageNumber;Swift
optional func toolManager(_ toolManager: PTToolManager, didEndDisplayingAppearanceView appearanceView: UIView, forAnnotation annotation: PTAnnot, onPageNumber pageNumber: Int32)Parameters
toolManagerThe tool manager.
appearanceViewThe annotation appearance view that was displayed.
annotationThe annotation.
pageNumberThe page number of the annotation.
PTToolManagerObserver Protocol Reference