PTFreeTextAnnotationOptions


@interface PTFreeTextAnnotationOptions : PTAnnotationOptions

An object that contains options for FreeText annotations.

  • Whether empty free text annotations with no text are deleted after editing.

    The default value of this property is YES.

    Declaration

    Objective-C

    @property (nonatomic) BOOL deleteEmptyAnnotation;

    Swift

    var deleteEmptyAnnotation: Bool { get set }
    • The default font to use for new FreeText annotations. This
    • string must be specified using the PostscriptFile name, e.g.
    • “CourierNewPS-BoldItalicMT”. These names can be retrieved as
    • follows: *
    • NSArray *fontFamilyNames = [UIFont familyNames]; for (NSString *familyName in fontFamilyNames) { NSLog(@"Font Family Name = %@", familyName); NSArray *names = [UIFont fontNamesForFamilyName:familyName]; NSLog(@" Font Names = %@", names); } *

    Declaration

    Objective-C

    @property (nonatomic, copy) PT_UNAVAILABLE_MSG("Set default free text font with +[PTColorDefaults " "setDefaultFreeTextFontName:]") NSString *defaultFontName;
  • Whether the PTFreeTextInputAccessoryView is enabled when creating or editing free text annotations. The default value of this property is YES.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite,
              getter=isInputAccessoryViewEnabled) BOOL inputAccessoryViewEnabled;

    Swift

    var isInputAccessoryViewEnabled: Bool { get set }
  • Whether rich text contents can be created and editing in free text annotations.

    The default value of this property is NO.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite,
              getter=isRichContentEnabled) BOOL richContentEnabled;

    Swift

    var isRichContentEnabled: Bool { get set }
  • Whether the free text annotation can be rotated.

    The default value of this property is YES.

    Declaration

    Objective-C

    @property (nonatomic, getter=canRotate) BOOL canRotate;

    Swift

    var canRotate: Bool { get set }
  • The list of tools classes for which to enable Apple Pencil Scribble input to free text annotations.

    The default value of this property is an array containing the PTFreeTextCreate class.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSArray<Class> *toolClassesForScribbleInput;

    Swift

    var toolClassesForScribbleInput: [AnyClass]? { get set }