PTLegacyAnnotationViewController


@interface PTLegacyAnnotationViewController
    : UITableViewController <PTOverridable>

The PTLegacyAnnotationViewController displays a list of all annotations in a document being viewed by a PTPDFViewCtrl The list will contain any comments that have been added to the annotations, and selecting an annotation will scroll the PTPDFViewCtrl to the position of the annotation. See the sample project Complete Reader for example usage.

  • The PTLegacyAnnotationViewController will display a list of the document’s annotations that can be used to navigate the document in a PTPDFViewCtrl. When an annotation is selected, the controller will navigate the PTPDFViewCtrl to its page. See the sample project Complete Reader for example usage.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithToolManager:
        (nonnull PTToolManager *)toolManager;

    Swift

    convenience init(toolManager: PTToolManager)
  • The PTLegacyAnnotationViewController will display a list of the document’s annotations that can be used to navigate the document in a PTPDFViewCtrl. When an annotation is selected, the controller will navigate the PTPDFViewCtrl to its page. See the sample project Complete Reader for example usage.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithPDFViewCtrl:
        (nonnull PTPDFViewCtrl *)pdfViewCtrl;

    Swift

    init(pdfViewCtrl: PTPDFViewCtrl)
  • Whether annotations are considered readonly and cannot be modified or deleted. The default value is NO, meaning that annotations can be deleted.

    Note

    The PTToolManager.readonly property is also consulted when determing if annotations can be modified or deleted. When PTToolManager.readonly is set to YES that property takes precedence over this property’s value.

    Declaration

    Objective-C

    @property (nonatomic, getter=isReadonly) BOOL readonly;

    Swift

    var isReadonly: Bool { get set }
  • Whether annotations are hidden in the annotation list. The default value is NO.

    Declaration

    Objective-C

    @property (nonatomic) BOOL annotationsHidden;

    Swift

    var annotationsHidden: Bool { get set }
  • An object that conforms to the PTLegacyAnnotationViewControllerDelegate protocol.

    Declaration

    Objective-C

    @property (nonatomic, weak, nullable) id<PTLegacyAnnotationViewControllerDelegate> delegate;

    Swift

    weak var delegate: (any PTLegacyAnnotationViewControllerDelegate)? { get set }
  • Returns the annotation object associated with the index path.

    Declaration

    Objective-C

    - (nullable PTAnnot *)annotationForIndexPath:(nonnull NSIndexPath *)indexPath;

    Swift

    func annotation(for indexPath: IndexPath) -> PTAnnot?

    Parameters

    indexPath

    The index path.

    Return Value

    The annotation associated with the given index path.

  • Reloads the list of annotations from the document.

    This method should only be called when the view controller is visible to avoid performing unnecessary work.

    Declaration

    Objective-C

    - (void)refresh;

    Swift

    func refresh()
  • Reloads the list of annotations from the document if this view controller’s view is currently visible (attached to a UIWindow).

    Declaration

    Objective-C

    - (void)refreshIfVisible;

    Swift

    func refreshIfVisible()
  • Undocumented

    Declaration

    Objective-C

    - (instancetype)initWithStyle:(UITableViewStyle)style NS_UNAVAILABLE;
  • Undocumented

    Declaration

    Objective-C

    - (instancetype)initWithNibName:(nullable NSString *)nibNameOrNil bundle:(nullable NSBundle *)nibBundleOrNil NS_UNAVAILABLE;
  • Undocumented

    Declaration

    Objective-C

    - (instancetype)initWithCoder:(NSCoder *)aDecoder NS_UNAVAILABLE;
  • Undocumented

    Declaration

    Objective-C

    - (instancetype)init NS_UNAVAILABLE;