PTDocumentSlider


@interface PTDocumentSlider : UIControl

A control used to select a single value from a continuous range of values. This control is similar to UISlider, except that this control can be oriented horizontally and vertically.

  • The axis along which the slider thumb moves.

    The default value of this property is UILayoutConstraintAxisHorizontal.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) UILayoutConstraintAxis axis;

    Swift

    var axis: NSLayoutConstraint.Axis { get set }
  • The view used to indicate the current value of the slider.

    Declaration

    Objective-C

    @property (readonly, nonatomic) UIView *_Nonnull thumbView;

    Swift

    var thumbView: UIView { get }
  • The slider’s current value.

    The default value of this property is 0.0.

    Declaration

    Objective-C

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

    Swift

    var value: CGFloat { get set }
  • The amount by which to compress the height/width of the slider when the scrollview bounces.

    Declaration

    Objective-C

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

    Swift

    var compress: CGFloat { get set }
  • Sets the slider’s current value, allowing you to animate the change visually.

    See

    value

    Declaration

    Objective-C

    - (void)setValue:(CGFloat)value animated:(BOOL)animated;

    Swift

    func setValue(_ value: CGFloat, animated: Bool)

    Parameters

    value

    The new value to assign to the value property

    animated

    Specify YES to animate the change in value; otherwise, specify NO to update the slider’s appearance immmediately.

  • The minimum value of the slider.

    The default value of this property is 0.0.

    Declaration

    Objective-C

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

    Swift

    var minimumValue: CGFloat { get set }
  • The maximum value of the slider.

    The default value of this property is 1.0.

    Declaration

    Objective-C

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

    Swift

    var maximumValue: CGFloat { get set }