PSPDFTextSelectionMode

Objective-C

enum PSPDFTextSelectionMode {}

Swift

@frozen enum TextSelectionMode : UInt

Defines the text selection mode in PSPDFTextSelectionView. Requires PSPDFFeatureMaskTextSelection to be enabled and textSelectionEnabled set to true.

  • Selecting text in regular mode starts after a long-press and results in a selection with dragging handles.

    Additionally, on iOS 12 and earlier, this mode uses two loupes and results either in a selection of one word or one image.

    Declaration

    Objective-C

    PSPDFTextSelectionModeRegular

    Swift

    case regular = 0
  • Selecting text in simple mode starts almost immediately on touch down and results in a selection with dragging handles.

    Additionally, on iOS 12 and earlier, this mode doesn’t use the round loupe and can result in a selection containing multiple words.

    This mode is similar to selecting text in Apple Books and is useful for applications where highlighting is a main feature.

    Declaration

    Objective-C

    PSPDFTextSelectionModeSimple

    Swift

    case simple = 1
  • Selection mode will be chosen based on input device: selecting text with finger or Apple Pencil will use regular mode, while selecting text with trackpad or mouse (on iOS 13.4 or later or on Mac Catalyst) will use simple mode.

    This mode is recommended for most use cases, as it resembles the standard system text selection behavior most closely.

    Declaration

    Objective-C

    PSPDFTextSelectionModeAutomatic

    Swift

    case automatic = 2