PSPDFAnnotationStyleViewController


@interface PSPDFAnnotationStyleViewController
    : PSPDFStaticTableViewController <PSPDFFontPickerViewControllerDelegate,
                                      PSPDFStyleable>

An inspector that allows users to view and change the properties of annotations.

@note: The inspector currently only supports setting one annotation, but since long-term we want multi-select-change, the API has already been prepared for.

  • Unavailable

    Undocumented

    Declaration

    Objective-C

    PSPDF_EMPTY_INIT_UNAVAILABLE
  • Unavailable

    Undocumented

    Declaration

    Objective-C

    PSPDF_EMPTY_INIT_UNAVAILABLE
  • Designated initializer. Initialize the controller with one or multiple annotations.

    Declaration

    Objective-C

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

    Swift

    init(annotations: [PSPDFAnnotation]?)
  • The current selected annotations.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic, nullable)
        NSArray<PSPDFAnnotation *> *annotations;

    Swift

    var annotations: [PSPDFAnnotation]? { get set }
  • Controller delegate. Informs about begin/end editing a property.

    Declaration

    Objective-C

    @property (readwrite, nonatomic)
        id<PSPDFAnnotationStyleViewControllerDelegate> _Nullable delegate;

    Swift

    @IBOutlet weak var delegate: PSPDFAnnotationStyleViewControllerDelegate? { get set }
  • Shows a preview area on top. Defaults to NO.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL showPreviewArea;

    Swift

    var showPreviewArea: Bool { get set }
  • List of supported inspector properties for various annotation types

    The dictionary is keyed by annotation type (PSPDFAnnotationString). The values are either:

    See PSPDFAnnotationStyleKey for a list of supported keys.

    Defaults to an empty dictionary. Normally set to the values from PSPDFConfiguration after initialization.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic)
        NSDictionary<PSPDFAnnotationString, id> *_Nonnull propertiesForAnnotations;

    Swift

    var propertiesForAnnotations: [AnnotationString : Any] { get set }
  • Shows a custom cell with configurable color presets for the provided annotation types. Defaults to PSPDFAnnotationTypeAll. Normally set to the values from PSPDFConfiguration after initialization.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic)
        PSPDFAnnotationType typesShowingColorPresets;

    Swift

    var typesShowingColorPresets: AnnotationType { get set }
  • Saves changes to the color presets. Defaults to YES.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL persistsColorPresetChanges;

    Swift

    var persistsColorPresetChanges: Bool { get set }
  • Returns the list of properties where we want to build cells for.

    Note

    The arrays can be used to split the properties into different sections.

    Declaration

    Objective-C

    - (nonnull NSArray<NSArray<PSPDFAnnotationStyleKey> *> *)
    propertiesForAnnotations:(nonnull NSArray<PSPDFAnnotation *> *)annotations;

    Swift

    func properties(for annotations: [PSPDFAnnotation]) -> [[AnnotationStyleKey]]