PSPDFAnnotationGroupItem
Objective-C
@interface PSPDFAnnotationGroupItem : PSPDFModel
An annotation group items defines one annotation type, optionally with a variant.
-
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
-
Creates a group item with the specified annotation type.
See
itemWithType:variant:configurationBlock:Declaration
Objective-C
+ (nonnull PSPDFAnnotationGroupItem *)itemWithType: (nonnull PSPDFAnnotationString)type;
-
Creates a group item with the specified annotation type and optional variant identifier.
See
itemWithType:variant:configurationBlock:Declaration
Objective-C
+ (nonnull PSPDFAnnotationGroupItem *) itemWithType:(nonnull PSPDFAnnotationString)type variant:(nullable PSPDFAnnotationVariantString)variant;
-
Creates a group item with the specified annotation type, an optional variant identifier and configuration block.
Note
Whenever possible try to return a template image from the configuration block (UIImageRenderingModeAlwaysTemplate). Use the provided tint color only when you need multi-color images.Declaration
Objective-C
+ (nonnull PSPDFAnnotationGroupItem *) itemWithType:(nonnull PSPDFAnnotationString)type variant:(nullable PSPDFAnnotationVariantString)variant configurationBlock: (nullable PSPDFAnnotationGroupItemConfigurationBlock)block;
Parameters
type
The annotation type.
variant
An optional annotation string for the item variant. Use variants to add several instances of the same tool with uniquely preservable annotation style settings.
block
An option block, that should return the button’s image. If nil,
defaultConfigurationBlock
is used. -
A block that configures a preset image based on the annotation type.
Note
The annotation images are loaded using-[PSPDFKitGlobal imageNamed:]
, which means that you either need to supply your own icons to that method, use a custom configuration block, or link toPSPDFKitUI.framework
, if you want to use the default bundled annotation toolbar icons.Declaration
Objective-C
+ (nonnull PSPDFAnnotationGroupItemConfigurationBlock)defaultConfigurationBlock;
-
The set annotation type.
Declaration
Objective-C
@property (nonatomic, copy, readonly) PSPDFAnnotationString _Nonnull type;
-
The annotation variant, if set during initialization.
Declaration
Objective-C
@property (nonatomic, copy, readonly, nullable) PSPDFAnnotationVariantString variant;
-
Used to generate the annotation image. Will be
defaultConfigurationBlock
orinkConfigurationBlock
in most cases.Declaration
Objective-C
@property (nonatomic, copy, readonly) PSPDFAnnotationGroupItemConfigurationBlock _Nonnull configurationBlock;
-
Produces the default Ink annotation icon, which includes the currently set ink color and thickness.
Only supported for Ink annotation types.
Note
The ink annotation image is loaded using-[PSPDFKitGlobal imageNamed:]
, which means that you either need to supply your own ink icon for that method, use a custom configuration block, or link toPSPDFKitUI.framework
, to obtain default bundled annotation toolbar icons.Declaration
Objective-C
+ (nonnull PSPDFAnnotationGroupItemConfigurationBlock)inkConfigurationBlock;
-
Produces the default Line annotation icon with support for arrow.
Declaration
Objective-C
+ (nonnull PSPDFAnnotationGroupItemConfigurationBlock)lineConfigurationBlock;
-
Block to configure the
PSPDFAnnotationVariantStringFreeTextCallout
option ofPSPDFAnnotationStringFreeText
.Declaration
Objective-C
+ (nonnull PSPDFAnnotationGroupItemConfigurationBlock) freeTextConfigurationBlock;
-
Block to configure the
PSPDFAnnotationVariantStringPolygonCloud
option ofPSPDFAnnotationStringPolygon
.Declaration
Objective-C
+ (nonnull PSPDFAnnotationGroupItemConfigurationBlock)polygonConfigurationBlock;
-
Block to configure the measurement variants of
PSPDFAnnotationStringLine
,PSPDFAnnotationStringPolyLine
,PSPDFAnnotationStringPolygon
,PSPDFAnnotationStringCircle
andPSPDFAnnotationStringSquare
.Declaration
Objective-C
+ (nonnull PSPDFAnnotationGroupItemConfigurationBlock) measurementConfigurationBlock;