PSPDFSearchHighlightView

Objective-C


@interface PSPDFSearchHighlightView
    : UIView <PSPDFAnnotationPresenting, PSPDFOverridable>

Swift

class SearchHighlightView : UIView, AnnotationPresenting, Overridable

Highlight view used to show where the search keyword is within the document.

  • Animates the view with a short “pop” size animation.

    Declaration

    Objective-C

    - (void)popupAnimation;

    Swift

    func popupAnimation()
  • Attached search result.

    Declaration

    Objective-C

    @property (nonatomic, nullable) PSPDFSearchResult *searchResult;

    Swift

    var searchResult: PSPDFSearchResult? { get set }
  • Default background color is yellow, 50% alpha.

    Declaration

    Objective-C

    @property (nonatomic, nullable) UIColor *selectionBackgroundColor;

    Swift

    var selectionBackgroundColor: UIColor? { get set }
  • The corner radius of the highlight, expressed as a proportion of its size. The corner radius will be this fraction multiplied by the minimum of the highlight’s width and height. Padding is added to the highlight to ensure rounded corners still cover the selected text. Set to 0 for no corner rounding, and 0.5 for semicircular ends. Defaults to 0.25.

    Declaration

    Objective-C

    @property (nonatomic) CGFloat cornerRadiusProportion;

    Swift

    var cornerRadiusProportion: CGFloat { get set }