PSPDFFreeTextAccessoryViewDelegate
Objective-C
@protocol PSPDFFreeTextAccessoryViewDelegate <NSObject>
Swift
protocol FreeTextAccessoryViewDelegate : NSObjectProtocol
Delegate to receive actions from the free text accessory view.
-
Called when the done button is pressed. You should resign first responder status at this point.
Declaration
Objective-C
- (void)doneButtonPressedOnFreeTextAccessoryView: (nonnull PSPDFFreeTextAccessoryView *)inputView;
Swift
optional func doneButtonPressed(on inputView: FreeTextAccessoryView)
-
Called when the clear text button is pressed. Use this to clear the text field and update the annotation.
Declaration
Objective-C
- (void)clearButtonPressedOnFreeTextAccessoryView: (nonnull PSPDFFreeTextAccessoryView *)inputView;
Swift
optional func clearButtonPressed(on inputView: FreeTextAccessoryView)
-
Show the text inspector (relevant only if the inspector button is used - only on iPhone by default).
Declaration
Objective-C
- (nullable PSPDFAnnotationStyleViewController *) freeTextAccessoryViewDidRequestInspector: (nonnull PSPDFFreeTextAccessoryView *)inputView;
Swift
optional func freeTextAccessoryViewDidRequestInspector(_ inputView: FreeTextAccessoryView) -> AnnotationStyleViewController?
-
Allow or reject a property change. Assumes always YES if left unimplemented.
Declaration
Objective-C
- (BOOL)freeTextAccessoryView: (nonnull PSPDFFreeTextAccessoryView *)styleController shouldChangeProperty:(nonnull NSString *)propertyName;
Swift
optional func freeTextAccessoryView(_ styleController: FreeTextAccessoryView, shouldChangeProperty propertyName: String) -> Bool
-
Called whenever a style property of
FreeTextAccessoryView
changes. Use this to also update the annotation bounding box and view frames as needed.Declaration
Objective-C
- (void)freeTextAccessoryView: (nonnull PSPDFFreeTextAccessoryView *)styleController didChangeProperty:(nonnull NSString *)propertyName;
Swift
optional func freeTextAccessoryView(_ styleController: FreeTextAccessoryView, didChangeProperty propertyName: String)