PSPDFAnnotationStyleViewController
Objective-C
@interface PSPDFAnnotationStyleViewController
: PSPDFStaticTableViewController <PSPDFFontPickerViewControllerDelegate,
PSPDFStyleable, PSPDFOverridable>
Swift
class AnnotationStyleViewController : PDFStaticTableViewController, FontPickerViewControllerDelegate, Styleable, Overridable
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
Not the designated initializer
Undocumented
Declaration
Objective-C
PSPDF_EMPTY_INIT_UNAVAILABLE
-
Unavailable
Not the designated initializer
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: [Annotation]?)
-
The current selected annotations.
Declaration
Objective-C
@property (nonatomic, copy, nullable) NSArray<PSPDFAnnotation *> *annotations;
Swift
var annotations: [Annotation]? { get set }
-
Controller delegate. Informs about begin/end editing a property.
Declaration
Objective-C
@property (nonatomic, weak) id<PSPDFAnnotationStyleViewControllerDelegate> _Nullable delegate;
Swift
@IBOutlet weak var delegate: AnnotationStyleViewControllerDelegate? { get set }
-
Shows a preview area on top. Defaults to NO.
Declaration
Objective-C
@property (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:- an array of arrays of property name strings (see
PSPDFAnnotationStyleKeyGroupedList
) - a block taking an annotation and returning
PSPDFAnnotationStyleKeyGroupedList
for it (seePSPDFAnnotationStyleBlock
)
See
AnnotationStyle.Key
for a list of supported keys.Defaults to an empty dictionary. Normally set to the values from PSPDFConfiguration after initialization.
Declaration
Objective-C
@property (nonatomic, copy) NSDictionary<PSPDFAnnotationString, id> *_Nonnull propertiesForAnnotations;
Swift
var propertiesForAnnotations: [Annotation.Tool : Any] { get set }
- an array of arrays of property name strings (see
-
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 (nonatomic) PSPDFAnnotationType typesShowingColorPresets;
Swift
var typesShowingColorPresets: Annotation.Kind { get set }
-
Saves changes to the color presets. Defaults to YES.
Declaration
Objective-C
@property (nonatomic) BOOL persistsColorPresetChanges;
Swift
var persistsColorPresetChanges: Bool { get set }
-
Determines if changing the z-index is supported. If enabled, a row with buttons allowing changing the z-index will be shown.
This only works for existing annotations, not when previewed from the annotation toolbar.
Usually set to the
allowAnnotationZIndexMoves
value ofPDFConfiguration
.Defaults to YES.
Declaration
Objective-C
@property (nonatomic) BOOL allowAnnotationZIndexMoves;
Swift
var allowAnnotationZIndexMoves: 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: [Annotation]) -> [[String]]