PSPDFSelectionView


@interface PSPDFSelectionView : UIView

Captures touches and shows selection boxes during dragging. Shows the selection box during dragging when using the annotation selection tool. (The rectange 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 (readwrite, nonatomic)
        id<PSPDFSelectionViewDelegate> _Nullable delegate;

    Swift

    weak var delegate: PSPDFSelectionViewDelegate? { get set }
  • The selection opacity. Defaults to UIColor.pspdf_selectionAlpha.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) CGFloat selectionAlpha;

    Swift

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

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic, 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 UITouchTypeDirect and UITouchTypeStylus.

    Declaration

    Objective-C

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

    Swift

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

    Declaration

    Objective-C

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

    Swift

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

    Declaration

    Objective-C

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

    Swift

    var panGestureRecognizer: NSPanGestureRecognizer { get }