PSPDFEraseOverlay

Objective-C


@interface PSPDFEraseOverlay : UIView <PSPDFOverridable>

Swift

class EraseOverlay : UIView, Overridable

Draws a circle shape representing the user touch during erasing.

  • Defines if circle is visible. Defaults to YES.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite) BOOL circleVisible;

    Swift

    var circleVisible: Bool { get set }
  • Defines the circle line width. Defaults to 3.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite)
        CGFloat circleLineWidth;

    Swift

    var circleLineWidth: CGFloat { get set }
  • Defines the circle radius. Defaults to 25.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite) CGFloat circleRadius;

    Swift

    var circleRadius: CGFloat { get set }
  • Defines the circle color. Defaults to black.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite)
        UI_APPEARANCE_SELECTOR UIColor *circleColor;

    Swift

    var circleColor: UIColor { get set }
  • The internal shape layer (matches self.layer)

    Declaration

    Objective-C

    @property (nonatomic, readonly) CAShapeLayer *_Nonnull shapeLayer;

    Swift

    var shapeLayer: CAShapeLayer { get }
  • Indicated touch position.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite)
        CGPoint touchPosition;

    Swift

    var touchPosition: CGPoint { get set }
  • Set to YES before starting sending touchPosition updates and set back to NO afterwards.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite) BOOL tracking;

    Swift

    var tracking: Bool { get set }
  • Enabled or disables tracking and optionally animates the overlay in or out (animating the line width)

    Declaration

    Objective-C

    - (void)setTracking:(BOOL)tracking animated:(BOOL)animated;

    Swift

    func setTracking(_ tracking: Bool, animated: Bool)
  • Data source (zoom support)

    Declaration

    Objective-C

    @property (nonatomic, weak, readwrite)
        id<PSPDFEraseOverlayDataSource> _Nullable dataSource;

    Swift

    weak var dataSource: EraseOverlayDataSource? { get set }