RangeUISlider

@IBDesignable
@objc
open class RangeUISlider : UIView

A custom slider with double knob that allow the user to select a range. Created using autolayout and IBDesignabled/IBInspectable.

  • Slider identifier.

    Declaration

    Swift

    @IBInspectable
    public var identifier: Int
  • Scale minimum value.

    Declaration

    Swift

    @IBInspectable
    public var scaleMinValue: CGFloat
  • Scale maximum value.

    Declaration

    Swift

    @IBInspectable
    public var scaleMaxValue: CGFloat
  • Default left knob starting value.

    Declaration

    Swift

    @IBInspectable
    public var defaultValueLeftKnob: CGFloat
  • Default right knob starting value.

    Declaration

    Swift

    @IBInspectable
    public var defaultValueRightKnob: CGFloat
  • Background range selected strechable image.

    Declaration

    Swift

    @IBInspectable
    public var rangeSelectedBackgroundImage: UIImage? { get set }
  • Background range selected top edge insect for background image.

    Declaration

    Swift

    @IBInspectable
    public var rangeSelectedBackgroundEdgeInsetTop: CGFloat { get set }
  • Background range selected left edge insect for background image.

    Declaration

    Swift

    @IBInspectable
    public var rangeSelectedBackgroundEdgeInsetLeft: CGFloat { get set }
  • Background range selected bottom edge insect for background image.

    Declaration

    Swift

    @IBInspectable
    public var rangeSelectedBackgroundEdgeInsetBottom: CGFloat { get set }
  • Background range selected right edge insect for background image.

    Declaration

    Swift

    @IBInspectable
    public var rangeSelectedBackgroundEdgeInsetRight: CGFloat { get set }
  • Gradient color 1 for range not selected.

    Declaration

    Swift

    @IBInspectable
    public var rangeSelectedGradientColor1: UIColor? { get set }
  • Gradient color 2 for range not selected.

    Declaration

    Swift

    @IBInspectable
    public var rangeSelectedGradientColor2: UIColor? { get set }
  • Gradient start point for not selected range.

    Declaration

    Swift

    @IBInspectable
    public var rangeSelectedGradientStartPoint: CGPoint { get set }
  • Gradient end point for not selected range.

    Declaration

    Swift

    @IBInspectable
    public var rangeSelectedGradientEndPoint: CGPoint { get set }
  • Not selected range color.

    Declaration

    Swift

    @IBInspectable
    public var rangeNotSelectedColor: UIColor { get set }
  • Background range selected strechable image.

    Declaration

    Swift

    @IBInspectable
    public var rangeNotSelectedBackgroundImage: UIImage? { get set }
  • Background range selected top edge insect for background image.

    Declaration

    Swift

    @IBInspectable
    public var rangeNotSelectedBackgroundEdgeInsetTop: CGFloat { get set }
  • Background range selected left edge insect for background image.

    Declaration

    Swift

    @IBInspectable
    public var rangeNotSelectedBackgroundEdgeInsetLeft: CGFloat { get set }
  • Background range selected bottom edge insect for background image.

    Declaration

    Swift

    @IBInspectable
    public var rangeNotSelectedBackgroundEdgeInsetBottom: CGFloat { get set }
  • Background range selected right edge insect for background image.

    Declaration

    Swift

    @IBInspectable
    public var rangeNotSelectedBackgroundEdgeInsetRight: CGFloat { get set }
  • Gradient color 1 for range not selected.

    Declaration

    Swift

    @IBInspectable
    public var rangeNotSelectedGradientColor1: UIColor? { get set }
  • Gradient color 2 for range not selected.

    Declaration

    Swift

    @IBInspectable
    public var rangeNotSelectedGradientColor2: UIColor? { get set }
  • Gradient start point for not selected range.

    Declaration

    Swift

    @IBInspectable
    public var rangeNotSelectedGradientStartPoint: CGPoint { get set }
  • Gradient end point for not selected range.

    Declaration

    Swift

    @IBInspectable
    public var rangeNotSelectedGradientEndPoint: CGPoint { get set }
  • Left knob width.

    Declaration

    Swift

    @IBInspectable
    public var leftKnobWidth: CGFloat { get set }
  • Left knob height.

    Declaration

    Swift

    @IBInspectable
    public var leftKnobHeight: CGFloat { get set }
  • Left knob corners.

    Declaration

    Swift

    @IBInspectable
    public var leftKnobCorners: CGFloat { get set }
  • Left knob image.

    Declaration

    Swift

    @IBInspectable
    public var leftKnobImage: UIImage? { get set }
  • Left knob color.

    Declaration

    Swift

    @IBInspectable
    public var leftKnobColor: UIColor { get set }
  • Left knob shadow opacity.

    Declaration

    Swift

    @IBInspectable
    public var leftShadowOpacity: Float { get set }
  • Left knob shadow color.

    Declaration

    Swift

    @IBInspectable
    public var leftShadowColor: UIColor { get set }
  • Left knob shadow offset.

    Declaration

    Swift

    @IBInspectable
    public var leftShadowOffset: CGSize { get set }
  • Left knob shadow radius.

    Declaration

    Swift

    @IBInspectable
    public var leftShadowRadius: CGFloat { get set }
  • Gradient color 1 for range not selected.

    Declaration

    Swift

    @IBInspectable
    public var leftKnobGradientColor1: UIColor? { get set }
  • Gradient color 2 for range not selected.

    Declaration

    Swift

    @IBInspectable
    public var leftKnobGradientColor2: UIColor? { get set }
  • Gradient start point for not selected range.

    Declaration

    Swift

    @IBInspectable
    public var leftKnobGradientStartPoint: CGPoint { get set }
  • Gradient end point for not selected range.

    Declaration

    Swift

    @IBInspectable
    public var leftKnobGradientEndPoint: CGPoint { get set }
  • Left knob border width.

    Declaration

    Swift

    @IBInspectable
    public var leftKnobBorderWidth: CGFloat { get set }
  • Left knob border color.

    Declaration

    Swift

    @IBInspectable
    public var leftKnobBorderColor: UIColor { get set }
  • Right knob width.

    Declaration

    Swift

    @IBInspectable
    public var rightKnobWidth: CGFloat { get set }
  • Right knob height.

    Declaration

    Swift

    @IBInspectable
    public var rightKnobHeight: CGFloat { get set }
  • Right knob corners.

    Declaration

    Swift

    @IBInspectable
    public var rightKnobCorners: CGFloat { get set }
  • Right knob image.

    Declaration

    Swift

    @IBInspectable
    public var rightKnobImage: UIImage? { get set }
  • Right knob color.

    Declaration

    Swift

    @IBInspectable
    public var rightKnobColor: UIColor { get set }
  • Right knob shadow opacity.

    Declaration

    Swift

    @IBInspectable
    public var rightShadowOpacity: Float { get set }
  • Right knob shadow color.

    Declaration

    Swift

    @IBInspectable
    public var rightShadowColor: UIColor { get set }
  • Right knob shadow offset.

    Declaration

    Swift

    @IBInspectable
    public var rightShadowOffset: CGSize { get set }
  • Right knob shadow radius.

    Declaration

    Swift

    @IBInspectable
    public var rightShadowRadius: CGFloat { get set }
  • Gradient color 1 for range not selected.

    Declaration

    Swift

    @IBInspectable
    public var rightKnobGradientColor1: UIColor? { get set }
  • Gradient color 2 for range not selected.

    Declaration

    Swift

    @IBInspectable
    public var rightKnobGradientColor2: UIColor? { get set }
  • Gradient start point for not selected range.

    Declaration

    Swift

    @IBInspectable
    public var rightKnobGradientStartPoint: CGPoint { get set }
  • Gradient end point for not selected range.

    Declaration

    Swift

    @IBInspectable
    public var rightKnobGradientEndPoint: CGPoint { get set }
  • Right knob border width.

    Declaration

    Swift

    @IBInspectable
    public var rightKnobBorderWidth: CGFloat { get set }
  • Right knob border color.

    Declaration

    Swift

    @IBInspectable
    public var rightKnobBorderColor: UIColor { get set }
  • Bar height.

    Declaration

    Swift

    @IBInspectable
    public var barHeight: CGFloat { get set }
  • Bar leading offset.

    Declaration

    Swift

    @IBInspectable
    public var barLeading: CGFloat { get set }
  • Bar trailing offset.

    Declaration

    Swift

    @IBInspectable
    public var barTrailing: CGFloat { get set }
  • Bar corners.

    Declaration

    Swift

    @IBInspectable
    public var barCorners: CGFloat { get set }
  • Bar shadow opacity.

    Declaration

    Swift

    @IBInspectable
    public var barShadowOpacity: Float { get set }
  • Bar shadow color.

    Declaration

    Swift

    @IBInspectable
    public var barShadowColor: UIColor { get set }
  • Bar shadow offset.

    Declaration

    Swift

    @IBInspectable
    public var barShadowOffset: CGSize { get set }
  • Bar shadow radius.

    Declaration

    Swift

    @IBInspectable
    public var barShadowRadius: CGFloat { get set }
  • Bar border color.

    Declaration

    Swift

    @IBInspectable
    public var barBorderWidth: CGFloat { get set }
  • Bar border color.

    Declaration

    Swift

    @IBInspectable
    public var barBorderColor: UIColor { get set }
  • Container corners.

    Declaration

    Swift

    @IBInspectable
    public var containerCorners: CGFloat { get set }
  • Slider delegate.

    Declaration

    Swift

    public weak var delegate: RangeUISliderDelegate?
  • Standard init using coder.

    Declaration

    Swift

    required public init?(coder aDecoder: NSCoder)

    Parameters

    aDecoder

    the decoder used to init the sliders.

  • Standard init using a CGRect.

    Declaration

    Swift

    override public init(frame: CGRect)

    Parameters

    frame

    the frame used to init the slider.

  • Method used to prepare fake values for interface builder preview.

    Declaration

    Swift

    open override func prepareForInterfaceBuilder()
  • Method used to layout precisely the subview. Used here to set the starting values of the knob.

    Declaration

    Swift

    open override func layoutSubviews()
  • Method used to respond to the gesture recognizer attached on the left knob.

    Declaration

    Swift

    @objc
    public final func moveLeftKnob(gestureRecognizer: UIPanGestureRecognizer)

    Parameters

    gestureRecognizer

    the gesture recognizer that uses this method as selector.

  • Method used to respond to the gesture recognizer attached on the right knob.

    Declaration

    Swift

    @objc
    public final func moveRightKnob(gestureRecognizer: UIPanGestureRecognizer)

    Parameters

    gestureRecognizer

    the gesture recognizer that uses this method as selector.