PTSmartTool


@interface PTSmartTool : 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 active tool that is currently used for annotation or interaction. This tool can represent either the primary tool or the secondary tool in viewer interaction

    Declaration

    Objective-C

    @property (nonatomic, weak, readonly) PTTool *_Nullable activeTool;

    Swift

    weak var activeTool: PTTool? { get }
  • 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 default value for the secondaryTool instance property. The class must be a subclass of the PTFreeHandCreate abstract base class.

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

    Declaration

    Objective-C

    @property (class, nonatomic, strong, readonly) Class _Nonnull defaultPrimaryToolClass;

    Swift

    class var defaultPrimaryToolClass: AnyClass { 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 }
  • The presets of the primary ink tool

    Declaration

    Objective-C

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

    Swift

    var primaryPresets: PTAnnotationStylePresetsGroup { get }
  • The presets of the secondary ink tool

    Declaration

    Objective-C

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

    Swift

    var secondaryPresets: PTAnnotationStylePresetsGroup { get }
  • Synchronize selected style index between primary and secondary presets groups

    Declaration

    Objective-C

    - (void)synchronizeSelectedStyleIndexes;

    Swift

    func synchronizeSelectedStyleIndexes()
  • The selected styles for the primary and secondary tools.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSArray<PTAnnotStyle *> *_Nonnull selectedStyles;

    Swift

    var selectedStyles: [PTAnnotStyle] { get }
  • The style for the currently active tool.

    The value of this property is one of the styles in the selected styles list.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) PTAnnotStyle *_Nonnull activeToolStyle;

    Swift

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

    Declaration

    Objective-C

    - (void)editAnnotationStyle:(nonnull id)sender;

    Swift

    func editAnnotationStyle(_ sender: Any)