PSPDFAnnotationStyleViewControllerDelegate
Objective-C
@protocol PSPDFAnnotationStyleViewControllerDelegate <NSObject>
Swift
protocol AnnotationStyleViewControllerDelegate : NSObjectProtocol
Delegate for AnnotationStyleViewController
.
-
Called when a user changes one or more properties.
Note
This might be called multiple times for continuous properties (e.g. thickness) while a user is still changing the property. You can implement this method to react to changes in real time.
Declaration
Objective-C
- (void)annotationStyleController: (nonnull PSPDFAnnotationStyleViewController *)styleController didChangeProperties:(nonnull NSArray<NSString *> *)propertyNames;
Swift
func annotationStyleController(_ styleController: AnnotationStyleViewController, didChangeProperties propertyNames: [String])
Parameters
styleController
The calling style view controller.
propertyNames
Array of properties that changed.
-
Called when a user starts changing a property (e.g. touches down on a thickness slider).
Declaration
Objective-C
- (void)annotationStyleController: (nonnull PSPDFAnnotationStyleViewController *)styleController didBeginChangingProperty:(nonnull PSPDFAnnotationStyleKey)property;
Swift
optional func annotationStyleController(_ styleController: AnnotationStyleViewController, didBeginChangingProperty property: String)
Parameters
styleController
The calling style controller.
property
Property that a user started changing.
-
Called when a user finishes changing a property.
Note
This is called even when a user started changing a property but then cancelled their interaction (e.g. touched down on a thickness slider without changing the value). In such cases,
affectedProperties
will be empty.Note
In contrast to
annotationStyleController(_:didChangeProperties:)
, this is called only once per user interaction.Declaration
Objective-C
- (void)annotationStyleController: (nonnull PSPDFAnnotationStyleViewController *)styleController didEndChangingProperty:(nonnull PSPDFAnnotationStyleKey)property affectedProperties: (nonnull NSArray<NSString *> *)affectedProperties;
Swift
optional func annotationStyleController(_ styleController: AnnotationStyleViewController, didEndChangingProperty property: String, affectedProperties: [String])
Parameters
styleController
The calling style controller.
property
Property that a user finished changing.
affectedProperties
All properties that were affected by the change.
-
Should return the annotation view that currently represents the provided
annotation
, if available. Important for free text annotation sizing.Declaration
Objective-C
- (nullable UIView<PSPDFAnnotationPresenting> *) annotationStyleController: (nonnull PSPDFAnnotationStyleViewController *)styleController annotationViewForAnnotation:(nonnull PSPDFAnnotation *)annotation;
Swift
optional func annotationStyleController(_ styleController: AnnotationStyleViewController, annotationViewFor annotation: Annotation) -> (UIView & AnnotationPresenting)?
-
Called when the annotation style view controller triggers a z-index move. The delegate is responsible for actually executing the z-index move.
Declaration
Objective-C
- (void)annotationStyleController: (nonnull PSPDFAnnotationStyleViewController *)styleController executeZIndexMove:(PSPDFAnnotationZIndexMove)zIndexMove;
Swift
optional func annotationStyleController(_ styleController: AnnotationStyleViewController, execute zIndexMove: Annotation.ZIndexMove)
-
Called to determine if the annotation style view controller can execute a z-index move. This causes the z-index reordering buttons to be enabled or disabled accordingly.
Declaration
Objective-C
- (BOOL)annotationStyleController: (nonnull PSPDFAnnotationStyleViewController *)styleController canExecuteZIndexMove:(PSPDFAnnotationZIndexMove)zIndexMove;
Swift
optional func annotationStyleController(_ styleController: AnnotationStyleViewController, canExecute zIndexMove: Annotation.ZIndexMove) -> Bool