PTAnnotationModel

@protocol PTAnnotationModel <NSObject>

A protocol that defines the interface of an annotation model object.

  • A string that uniquely identifies this annotation on its page.

    Declaration

    Objective-C

    @required
    @property (nonatomic, copy, readonly, nullable) NSString *identifier;

    Swift

    var identifier: String? { get }
  • Whether this annotation is a placeholder that was created to establish a parent-reply relationship.

    Declaration

    Objective-C

    @required
    @property (nonatomic, readonly, getter=isPlaceholder) BOOL placeholder;

    Swift

    var isPlaceholder: Bool { get }
  • The type of the modelled PDF annotation.

    Declaration

    Objective-C

    @required
    @property (nonatomic, readonly) PTAnnotType type;

    Swift

    var type: PTAnnotType { get }
  • The extended annotation type name of the modelled PDF annotation.

    Declaration

    Objective-C

    @required
    @property (nonatomic, copy, readonly, nullable) PTExtendedAnnotName typeName;

    Swift

    var typeName: PTExtendedAnnotName? { get }
  • The extended annotation type of the modelled PDF annotation.

    Declaration

    Objective-C

    @required
    @property (nonatomic, readonly) PTExtendedAnnotType extendedAnnotType;

    Swift

    var extendedAnnotType: PTExtendedAnnotType { get }
  • The opacity of the annotation, from 0.0 to 1.0.

    The default value of this property is 1.0.

    Declaration

    Objective-C

    @required
    @property (nonatomic, readonly) double opacity;

    Swift

    var opacity: Double { get }
  • The page model object that contains this annotation.

    Declaration

    Objective-C

    @required
    @property (nonatomic, weak, readonly, nullable) id<PTPageModel> page;

    Swift

    weak var page: (any PTPageModel)? { get }
  • The PDF page number of this annotation.

    Declaration

    Objective-C

    @required
    @property (nonatomic, readonly) int pageNumber;

    Swift

    var pageNumber: Int32 { get }
  • The PDF page-space rect of this annotation.

    Declaration

    Objective-C

    @required
    @property (nonatomic, readonly) CGRect pageRect;

    Swift

    var pageRect: CGRect { get }
  • x

    The lower-left x coordinate of the annotation, in PDF page-space coordinates.

    See

    pageRect

    Declaration

    Objective-C

    @required
    @property (nonatomic, readonly) CGFloat x;

    Swift

    var x: CGFloat { get }
  • y

    The lower-left y coordinate of the annotation, in PDF page-space coordinates.

    Declaration

    Objective-C

    @required
    @property (nonatomic, readonly) CGFloat y;

    Swift

    var y: CGFloat { get }
  • The width of the annotation, in PDF page-space coordinates.

    Declaration

    Objective-C

    @required
    @property (nonatomic, readonly) CGFloat width;

    Swift

    var width: CGFloat { get }
  • The height of the annotation, in PDF page-space coordinates.

    Declaration

    Objective-C

    @required
    @property (nonatomic, readonly) CGFloat height;

    Swift

    var height: CGFloat { get }
  • The text contents of the annotation.

    Declaration

    Objective-C

    @required
    @property (nonatomic, copy, readonly, nullable) NSString *contents;

    Swift

    var contents: String? { get }
  • The primary color of the annotation.

    Declaration

    Objective-C

    @required
    @property (nonatomic, retain, readonly, nullable) UIColor *color;

    Swift

    var color: UIColor? { get }
  • The creation date of the annotation.

    Declaration

    Objective-C

    @required
    @property (nonatomic, copy, readonly, nullable) NSDate *creationDate;

    Swift

    var creationDate: Date? { get }
  • The modification date of the annotation.

    Declaration

    Objective-C

    @required
    @property (nonatomic, copy, readonly, nullable) NSDate *modificationDate;

    Swift

    var modificationDate: Date? { get }
  • The date of the last reply to this annotation.

    Declaration

    Objective-C

    @required
    @property (nonatomic, copy, readonly, nullable) NSDate *lastReplyDate;

    Swift

    var lastReplyDate: Date? { get }
  • The state of the annotation.

    Declaration

    Objective-C

    @required
    @property (nonatomic, copy, readonly, nullable) NSString *state;

    Swift

    var state: String? { get }
  • The parent annotation of this reply.

    Declaration

    Objective-C

    @required
    @property (nonatomic, weak, readonly, nullable) id<PTAnnotationModel> parent;

    Swift

    weak var parent: (any PTAnnotationModel)? { get }
  • The replies made to this annotation.

    Declaration

    Objective-C

    @required
    @property (nonatomic, copy, readonly, nullable)
        NSSet<id<PTAnnotationModel>> *replies;

    Swift

    var replies: Set<AnyHashable>? { get }
  • The most recent reply, by creation date, made to this annotation.

    Declaration

    Objective-C

    @required
    @property (nonatomic, strong, readonly, nullable) id<PTAnnotationModel>
        lastReply;

    Swift

    var lastReply: (any PTAnnotationModel)? { get }
  • The number of replies made to this annotation.

    This property is a convenience for the count of replies in the replies property.

    Declaration

    Objective-C

    @required
    @property (nonatomic, readonly) int replyCount;

    Swift

    var replyCount: Int32 { get }
  • The author of this annotation.

    Declaration

    Objective-C

    @required
    @property (nonatomic, strong, readonly, nullable) id<PTAnnotationAuthorModel>
        author;

    Swift

    var author: (any PTAnnotationAuthorModel)? { get }
  • A string identifier that can be used to group annotations by creation date day.

    Declaration

    Objective-C

    @required
    @property (nonatomic, copy, readonly, nullable)
        NSString *creationDateDaySectionIdentifier;

    Swift

    var creationDateDaySectionIdentifier: String? { get }
  • A string identifier that can be used to group annotations by modification date day.

    Declaration

    Objective-C

    @required
    @property (nonatomic, copy, readonly, nullable)
        NSString *modificationDateDaySectionIdentifier;

    Swift

    var modificationDateDaySectionIdentifier: String? { get }