PTPDFAnnotationChange


@interface PTPDFAnnotationChange : NSObject

Instances of this class represent annotation changes (add, modify, remove, etc.).

  • Initializes a newly created PTPDFAnnotationChange instance.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithChangeType:(PTPDFAnnotationChangeType)type
                                 forAnnotation:(nonnull PTAnnot *)annotation
                                  onPageNumber:(int)pageNumber;

    Swift

    init(changeType type: PTPDFAnnotationChange.ChangeType, forAnnotation annotation: PTAnnot, onPageNumber pageNumber: Int32)

    Parameters

    type

    The type of this change

    annotation

    The annotation involved in the change

    pageNumber

    The PDF page number of the annotation

    Return Value

    an initialized instance of the PTPDFAnnotationChange class

  • Undocumented

    Declaration

    Objective-C

    - (instancetype)init NS_UNAVAILABLE;
  • The type of this change.

    Declaration

    Objective-C

    @property (nonatomic, readonly) PTPDFAnnotationChangeType type;

    Swift

    var type: PTPDFAnnotationChange.ChangeType { get }
  • The annotation involved in this change.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly, nullable) PTAnnot *annotation;

    Swift

    var annotation: PTAnnot? { get }
  • The PDF page number of this change’s annotation.

    Declaration

    Objective-C

    @property (nonatomic, readonly) int pageNumber;

    Swift

    var pageNumber: Int32 { get }
  • Returns whether the receiver and the specified PTPDFAnnotationChange instance are equal.

    Declaration

    Objective-C

    - (BOOL)isEqualToChange:(nonnull PTPDFAnnotationChange *)change;

    Swift

    func isEqual(to change: PTPDFAnnotationChange) -> Bool

    Parameters

    change

    The other PTPDFAnnotationChange instance to compare for equality

    Return Value

    YES if the receiver is equal to the specified change, NO otherwise

  • Creates a new PTPDFAnnotationChange instance initialized with the specified parameters.

    Declaration

    Objective-C

    + (nonnull instancetype)changeWithType:(PTPDFAnnotationChangeType)type
                             forAnnotation:(nonnull PTAnnot *)annotation
                              onPageNumber:(int)pageNumber;

    Swift

    convenience init(type: PTPDFAnnotationChange.ChangeType, forAnnotation annotation: PTAnnot, onPageNumber pageNumber: Int32)

    Parameters

    type

    The type of the change

    annotation

    The annotation involved in the change

    pageNumber

    The PDF page number of the annotation

    Return Value

    an initialized instance of the PTPDFAnnotationChange class