PTAnnotationRefreshCustomAppearanceHandler
@interface PTAnnotationRefreshCustomAppearanceHandler
: NSObject <PTAnnotationRefreshAppearanceHandler>
An abstract base class for annotation refresh appearance handlers that generate a custom PDF appearance for annotations.
-
Initializes a
PTAnnotationRefreshCustomAppearanceHandler
instance.Declaration
Objective-C
- (nonnull instancetype)init;
Swift
init()
Return Value
An initialized
PTAnnotationRefreshCustomAppearanceHandler
instance.
-
Generates a custom PDF appearance for the specified annotation.
Note
The default implementation of this method returns
nil
.Declaration
Objective-C
- (nullable PTObj *) generateCustomAppearanceForAnnotation:(nonnull PTAnnot *)annotation withOptions: (nullable PTRefreshOptions *)refreshOptions userInfo: (nullable NSDictionary< PTAnnotationRefreshAppearanceUserInfoKey, id> *)userInfo;
Swift
func generateCustomAppearance(forAnnotation annotation: PTAnnot, with refreshOptions: PTRefreshOptions?, userInfo: [PTAnnotationRefreshAppearanceUserInfoKey : Any]? = nil) -> PTObj?
Parameters
annotation
The PDF annotation for which to generate an appearance.
refreshOptions
The refresh options to use, or
nil
userInfo
A dictionary containing additional information, or
nil
Return Value
The generated custom PDF appearance for the annotation, or
nil
if an appearance could not be created.