PTSmartPen


@interface PTSmartPen : PTTool

A tool that creates different types of annotations depending on if a touch begins over text in the document or over a non-text area.

  • The primary freehand/ink annotation creation tool. This tool is used for touches that do not begin over text in the document.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) PTFreeHandCreate *_Nonnull primaryTool;

    Swift

    var primaryTool: PTFreeHandCreate { get }
  • The secondary text markup annotation creation tool. This tool is used for touches that begin over text in the document.

    The secondaryToolClass property can be used to change the tool class of this property.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) PTTextMarkupCreate *_Nonnull secondaryTool;

    Swift

    var secondaryTool: PTTextMarkupCreate { get }
  • The tool class to use for the secondaryTool. The class must be a subclass of the PTTextMarkupCreate abstract base class.

    The default value of this property is the PTComboTool.defaultSecondaryToolClass class property value.

    Declaration

    Objective-C

    @property (nonatomic, strong, null_resettable) Class secondaryToolClass;

    Swift

    var secondaryToolClass: AnyClass! { get set }
  • The default value for the secondaryTool instance property. The class must be a subclass of the PTTextMarkupCreate abstract base class.

    The default value of this property is the PTTextHighlightCreate class. Setting a Nil value for this property will reset the value to its default value.

    Declaration

    Objective-C

    @property (class, nonatomic, strong, null_resettable) Class defaultSecondaryToolClass;

    Swift

    class var defaultSecondaryToolClass: AnyClass! { get set }
  • The annotation style presets for the primary tool.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) PTAnnotationStylePresetsGroup *_Nonnull annotationStylePresets;

    Swift

    var annotationStylePresets: PTAnnotationStylePresetsGroup { get }
  • Edit the annotation style from the group in annotationStylePresets.

    Declaration

    Objective-C

    - (void)editAnnotationStyle:(nonnull PTAnnotStyle *)annotationStyle;

    Swift

    func editAnnotationStyle(_ annotationStyle: PTAnnotStyle)