PSPDFAnnotationSet


@interface PSPDFAnnotationSet : PSPDFModel <NSFastEnumeration>

An annotation set may be used to add and position multiple annotations.

  • Undocumented

    Declaration

    Objective-C

    
    @interface PSPDFAnnotationSet : PSPDFModel <NSFastEnumeration>
  • Undocumented

    Declaration

    Objective-C

    
    @interface PSPDFAnnotationSet : PSPDFModel <NSFastEnumeration>
  • Designated initializer. annotations will be a deep copy of the current annotations. The boundingBox of the annotations will be normalized. (upper left one will have 0,0 origin)

    Declaration

    Objective-C

    - (nonnull instancetype)initWithAnnotations:
        (nonnull NSArray<__kindof PSPDFAnnotation *> *)annotations;

    Swift

    init(annotations: [PSPDFAnnotation])
  • The saved annotations.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic)
        NSArray<__kindof PSPDFAnnotation *> *_Nonnull annotations;

    Swift

    var annotations: [PSPDFAnnotation] { get }
  • Draw all annotations.

    Declaration

    Objective-C

    - (void)drawInContext:(nonnull CGContextRef)context
              withOptions:(nullable NSDictionary<NSString *, id> *)options;

    Swift

    func draw(in context: CGContext, withOptions options: [String : Any]? = nil)
  • Bounding box of all annotations. If set, will correctly resize all annotations.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) CGRect boundingBox;

    Swift

    var boundingBox: CGRect { get set }
  • Copies the current set to the clipboard.

    Declaration

    Objective-C

    - (void)copyToClipboard;

    Swift

    func copyToClipboard()
  • Loads a PSPDFAnnotationSet from the clipboard. - note: Also supports legacy format and will automatically pack it into a PSPDFAnnotationSet.

    Declaration

    Objective-C

    + (nullable instancetype)unarchiveFromClipboard;

    Swift

    class func unarchiveFromClipboard() -> Self?