PTPDFAnnotationProperties


@interface PTPDFAnnotationProperties : NSObject

Properties of a PDF annotation.

  • Initializes a newly created PTPDFAnnotationProperties instance.

    Declaration

    Objective-C

    - (nonnull instancetype)init;

    Swift

    init()

    Return Value

    An initialized PTPDFAnnotationProperties instance.

  • The annotation’s color, interpreted differently for certain annotation types.

    Note

    The default value of this property is nil.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) UIColor *color;

    Swift

    var color: UIColor? { get set }
  • The appearance of the annotation’s border.

    Note

    The default value of this property is nil.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) id<PTPDFAnnotationBorderAppearance> border;

    Swift

    var border: (any PTPDFAnnotationBorderAppearance)? { get set }
  • Creates and configures a PTPDFAnnotationProperties (subclass) instance for the specified PDF annotation.

    Note

    In Swift, this method is imported as a throwing function.

    Declaration

    Objective-C

    + (nullable instancetype)
        propertiesForAnnotation:(nonnull PTAnnot *)annotation
                      withError:(out NSError *_Nullable *_Nullable)outError;

    Swift

    convenience init(forAnnotation annotation: PTAnnot) throws

    Parameters

    annotation

    The PDF annotation.

    outError

    On input, a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing the error information. You may specify nil for this parameter if you do not want the error information.

    Return Value

    A configured PTPDFAnnotationProperties instance, or nil if an error occurred.

  • Configures the annotation properties from the specified PDF annotation.

    Note

    In Swift, this method is imported as a throwing function.

    Declaration

    Objective-C

    - (BOOL)configureWithAnnotation:(nonnull PTAnnot *)annotation
                              error:(out NSError *_Nullable *_Nullable)outError;

    Swift

    func configure(withAnnotation annotation: PTAnnot) throws

    Parameters

    annotation

    The PDF annotation.

    outError

    On input, a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing the error information. You may specify nil for this parameter if you do not want the error information.

    Return Value

    YES if the annotation properties were configured, or NO if an error occurred.