PSPDFSelectionView

Objective-C


@interface PSPDFSelectionView : UIView <PSPDFOverridable>

Swift

class SelectionView : UIView, Overridable

Captures touches and shows selection boxes during dragging. Shows the selection box during dragging when using the annotation selection tool. (The rectangle between the start location of dragging and the current touch location.) With the highlight tool, this also shows the proposed text to be highlighted. With the annotation selection tool, this also shows the proposed selected annotations. The selection color is determined by the tintColor property inherited from UIView. This is also used for text block debugging.

  • Selection View delegate.

    Declaration

    Objective-C

    @property (nonatomic, weak) id<PSPDFSelectionViewDelegate> _Nullable delegate;

    Swift

    weak var delegate: SelectionViewDelegate? { get set }
  • The selection opacity. Defaults to 0.2.

    Declaration

    Objective-C

    @property (nonatomic) CGFloat selectionAlpha;

    Swift

    var selectionAlpha: CGFloat { get set }
  • The CGRects in the view that are marked for selection.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSArray<NSValue *> *rects;

    Swift

    var rects: [NSValue]? { get set }
  • The touch types that should be used for selection. Array of UITouchType wrapped in NSNumber. The defaults are direct, pencil, and indirectPointer.

    Declaration

    Objective-C

    @property (nonatomic, copy) NSArray<NSNumber *> *_Nonnull allowedTouchTypes;

    Swift

    var allowedTouchTypes: [NSNumber] { get set }
  • Internal tap gesture.

    Declaration

    Objective-C

    @property (nonatomic, readonly) UITapGestureRecognizer *_Nonnull tapGestureRecognizer;

    Swift

    var tapGestureRecognizer: UITapGestureRecognizer { get }
  • Internal pan gesture.

    Declaration

    Objective-C

    @property (nonatomic, readonly) UIPanGestureRecognizer *_Nonnull panGestureRecognizer;

    Swift

    var panGestureRecognizer: UIPanGestureRecognizer { get }