RangeSlider

@available(iOS 14.0, *)
public struct RangeSlider : UIViewRepresentable

RangeUISlider SwiftUI implementation using UIViewRepresentable. It exposes all the RangeUIslider properties.

  • Min value selected binding value. In this property the min value selected will be exposed. It will be updated during dragging.

    Declaration

    Swift

    @Binding
    public var minValueSelected: CGFloat { get nonmutating set }
  • Max value selected binding value. In this property the max value selected will be exposed. It will be updated during dragging.

    Declaration

    Swift

    @Binding
    public var maxValueSelected: CGFloat { get nonmutating set }
  • Init RangeSlider.

    Declaration

    Swift

    public init(minValueSelected: Binding<CGFloat>, maxValueSelected: Binding<CGFloat>)

    Parameters

    minValueSelected

    the binding value to get the min value selected.

    maxValueSelected

    the binding value to get the max value selected.

lifecycle

  • Implementation of UIViewRepresentable.makeUIView(context: Context) method.

    Declaration

    Swift

    public func makeUIView(context: Context) -> RangeUISlider

    Parameters

    content

    the SwiftUI context.

    Return Value

    an instance of RangeUISlider

  • Implementation of UIViewRepresentable.updateUIView(_ uiView: RangeUISlider, context: Context) method.

    Declaration

    Swift

    public func updateUIView(_ uiView: RangeUISlider, context: Context)

    Parameters

    uiView

    the RangeUISlider instance.

    content

    the SwiftUI context.

  • Implementation of UIViewRepresentable.makeCoordinator() method.

    Declaration

    Swift

    public func makeCoordinator() -> RangeSliderCoordinator

    Return Value

    an instance of RangeSliderCoordinator

  • Set step increment value. If different from 0 RangeUISlider will let the user drag by step increment.

    Declaration

    Swift

    public func stepIncrement(_ value: CGFloat) -> RangeSlider

    Parameters

    value

    the value to be used as step increment.

  • Show or hide knobs labels.

    Declaration

    Swift

    public func showKnobsLabels(_ value: Bool) -> RangeSlider

    Parameters

    value

    the value used to decided if labels should be show or not.

  • Show labels at the top or at the bottom of knobs.

    Declaration

    Swift

    public func knobsLabelTopPosition(_ value: Bool) -> RangeSlider

    Parameters

    value

    the value used to decided if labels should be show top or bottom.

  • Set default left knob starting value.

    Declaration

    Swift

    public func defaultValueLeftKnob(_ value: CGFloat) -> RangeSlider

    Parameters

    value

    the value to be used as default left knob start.

  • Set default right knob starting value.

    Declaration

    Swift

    public func defaultValueRightKnob(_ value: CGFloat) -> RangeSlider

    Parameters

    value

    the value to be used as default right knob start.

  • Set scale minimum value.

    Declaration

    Swift

    public func scaleMinValue(_ value: CGFloat) -> RangeSlider

    Parameters

    value

    the value to be used as scale minimum value.

  • Set scale maximum value.

    Declaration

    Swift

    public func scaleMaxValue(_ value: CGFloat) -> RangeSlider

    Parameters

    value

    the value to be used as scale maximum value.

  • Set selected range color.

    Declaration

    Swift

    public func rangeSelectedColor(_ value: Color) -> RangeSlider

    Parameters

    value

    the value to be used as selected range color.

  • Set background range selected strechable image. The string will be used to search an image with that name in the current Bundle.

    Declaration

    Swift

    public func rangeSelectedBackgroundImage(_ value: String) -> RangeSlider

    Parameters

    value

    the value to be used as background range selected strechable image.

  • Set background range selected top edge insect for background image.

    Declaration

    Swift

    public func rangeSelectedBackgroundEdgeInsetTop(_ value: CGFloat) -> RangeSlider

    Parameters

    value

    the value to be used as background range selected top edge insect for background image.

  • Set background range selected left edge insect for background image.

    Declaration

    Swift

    public func rangeSelectedBackgroundEdgeInsetLeft(_ value: CGFloat) -> RangeSlider

    Parameters

    value

    the value to be used as background range selected left edge insect for background image.

  • Set background range selected bottom edge insect for background image.

    Declaration

    Swift

    public func rangeSelectedBackgroundEdgeInsetBottom(_ value: CGFloat) -> RangeSlider

    Parameters

    value

    the value to be used as background range selected bottom edge insect for background image.

  • Set background range selected right edge insect for background image.

    Declaration

    Swift

    public func rangeSelectedBackgroundEdgeInsetRight(_ value: CGFloat) -> RangeSlider

    Parameters

    value

    the value to be used as background range selected right edge insect for background image.

  • Set gradient color 1 for range selected. The value received is converted to a UIColor.

    Declaration

    Swift

    public func rangeSelectedGradientColor1(_ value: Color) -> RangeSlider

    Parameters

    value

    the value to be used as gradient color 1 for range selected.

  • Set gradient color 2 for range selected. The value received is converted to a UIColor.

    Declaration

    Swift

    public func rangeSelectedGradientColor2(_ value: Color) -> RangeSlider

    Parameters

    value

    the value to be used asgradient color 2 for range selected.

  • Set gradient start point for selected range.

    Declaration

    Swift

    public func rangeSelectedGradientStartPoint(_ value: CGPoint) -> RangeSlider

    Parameters

    value

    the value to be used as gradient start point for selected range.

  • Set gradient end point for selected range.

    Declaration

    Swift

    public func rangeSelectedGradientEndPoint(_ value: CGPoint) -> RangeSlider

    Parameters

    value

    the value to be used as gradient end point for selected range.

  • Set not selected range color.

    Declaration

    Swift

    public func rangeNotSelectedColor(_ value: Color) -> RangeSlider

    Parameters

    value

    the value to be used as not selected range color.

  • Set background range not selected strechable image. The string will be used to search an image with that name in the current Bundle.

    Declaration

    Swift

    public func rangeNotSelectedBackgroundImage(_ value: String) -> RangeSlider

    Parameters

    value

    the value to be used as background range not selected strechable image.

  • Set background range not selected top edge insect for background image.

    Declaration

    Swift

    public func rangeNotSelectedBackgroundEdgeInsetTop(_ value: CGFloat) -> RangeSlider

    Parameters

    value

    the value to be used as background range not selected top edge insect for background image.

  • Set background range not selected left edge insect for background image.

    Declaration

    Swift

    public func rangeNotSelectedBackgroundEdgeInsetLeft(_ value: CGFloat) -> RangeSlider

    Parameters

    value

    the value to be used as background range not selected left edge insect for background image.

  • Set background range not selected bottom edge insect for background image.

    Declaration

    Swift

    public func rangeNotSelectedBackgroundEdgeInsetBottom(_ value: CGFloat) -> RangeSlider

    Parameters

    value

    the value to be used as background range not selected bottom edge insect for background image.

  • Set background range not selected right edge insect for background image.

    Declaration

    Swift

    public func rangeNotSelectedBackgroundEdgeInsetRight(_ value: CGFloat) -> RangeSlider

    Parameters

    value

    the value to be used as background range not selected right edge insect for background image.

  • Set gradient color 1 for range not selected. The value received is converted to a UIColor.

    Declaration

    Swift

    public func rangeNotSelectedGradientColor1(_ value: Color) -> RangeSlider

    Parameters

    value

    the value to be used as gradient color 1 for range not selected.

  • Set gradient color 2 for range not selected. The value received is converted to a UIColor.

    Declaration

    Swift

    public func rangeNotSelectedGradientColor2(_ value: Color) -> RangeSlider

    Parameters

    value

    the value to be used as gradient color 2 for range not selected.

  • Set gradient start point for not selected range.

    Declaration

    Swift

    public func rangeNotSelectedGradientStartPoint(_ value: CGPoint) -> RangeSlider

    Parameters

    value

    the value to be used as gradient start point for not selected range.

  • Set gradient end point for not selected range.

    Declaration

    Swift

    public func rangeNotSelectedGradientEndPoint(_ value: CGPoint) -> RangeSlider

    Parameters

    value

    the value to be used as gradient end point for not selected range.

  • Set left knob width.

    Declaration

    Swift

    public func leftKnobWidth(_ value: CGFloat) -> RangeSlider

    Parameters

    value

    the value to be used as left knob width.

  • Set left knob height.

    Declaration

    Swift

    public func leftKnobHeight(_ value: CGFloat) -> RangeSlider

    Parameters

    value

    the value to be used as left knob height.

  • Set left knob corners.

    Declaration

    Swift

    public func leftKnobCorners(_ value: CGFloat) -> RangeSlider

    Parameters

    value

    the value to be used as left knob corners.

  • Set left knob image. The string will be used to search an image with that name in the current Bundle.

    Declaration

    Swift

    public func leftKnobImage(_ value: String) -> RangeSlider

    Parameters

    value

    the value to be used as left knob image.

  • Set left knob color. The value received is converted to a UIColor.

    Declaration

    Swift

    public func leftKnobColor(_ value: Color) -> RangeSlider

    Parameters

    value

    the value to be used as left knob color.

  • Set left shadow opacity.

    Declaration

    Swift

    public func leftShadowOpacity(_ value: Float) -> RangeSlider

    Parameters

    value

    the value to be used as left shadow opacity.

  • Set left shadow image.

    Declaration

    Swift

    public func leftShadowColor(_ value: Color) -> RangeSlider

    Parameters

    value

    the value to be used as left shadow image.

  • Set left shadow offset.

    Declaration

    Swift

    public func leftShadowOffset(_ value: CGSize) -> RangeSlider

    Parameters

    value

    the value to be used as left shadow offset.

  • Set left shadow radius.

    Declaration

    Swift

    public func leftShadowRadius(_ value: CGFloat) -> RangeSlider

    Parameters

    value

    the value to be used as left shadow radius.

  • Set left knob gradient color 1. The value received is converted to a UIColor.

    Declaration

    Swift

    public func leftKnobGradientColor1(_ value: Color) -> RangeSlider

    Parameters

    value

    the value to be used as left knob gradient color 1.

  • Set left knob gradient color 2. The value received is converted to a UIColor.

    Declaration

    Swift

    public func leftKnobGradientColor2(_ value: Color) -> RangeSlider

    Parameters

    value

    the value to be used as left knob gradient color 2.

  • Set left knob gradient start point.

    Declaration

    Swift

    public func leftKnobGradientStartPoint(_ value: CGPoint) -> RangeSlider

    Parameters

    value

    the value to be used as left shadow radius.

  • Set left knob gradient end point.

    Declaration

    Swift

    public func leftKnobGradientEndPoint(_ value: CGPoint) -> RangeSlider

    Parameters

    value

    the value to be used as left knob gradient end point.

  • Set left knob border width.

    Declaration

    Swift

    public func leftKnobBorderWidth(_ value: CGFloat) -> RangeSlider

    Parameters

    value

    the value to be used as left knob border width.

  • Set left knob border color. The value received is converted to a UIColor.

    Declaration

    Swift

    public func leftKnobBorderColor(_ value: Color) -> RangeSlider

    Parameters

    value

    the value to be used as left knob border color.

  • Set right knob width.

    Declaration

    Swift

    public func rightKnobWidth(_ value: CGFloat) -> RangeSlider

    Parameters

    value

    the value to be used as right knob width.

  • Set right knob height.

    Declaration

    Swift

    public func rightKnobHeight(_ value: CGFloat) -> RangeSlider

    Parameters

    value

    the value to be used as right knob height.

  • Set right knob corners.

    Declaration

    Swift

    public func rightKnobCorners(_ value: CGFloat) -> RangeSlider

    Parameters

    value

    the value to be used as right knob corners.

  • Set right knob image. The string will be used to search an image with that name in the current Bundle.

    Declaration

    Swift

    public func rightKnobImage(_ value: String) -> RangeSlider

    Parameters

    value

    the value to be used as right knob image.

  • Set right knob color. The value received is converted to a UIColor.

    Declaration

    Swift

    public func rightKnobColor(_ value: Color) -> RangeSlider

    Parameters

    value

    the value to be used as right knob color.

  • Set right shadow opacity.

    Declaration

    Swift

    public func rightShadowOpacity(_ value: Float) -> RangeSlider

    Parameters

    value

    the value to be used as right shadow opacity.

  • Set right shadow image.

    Declaration

    Swift

    public func rightShadowColor(_ value: Color) -> RangeSlider

    Parameters

    value

    the value to be used as right shadow image.

  • Set right shadow offset.

    Declaration

    Swift

    public func rightShadowOffset(_ value: CGSize) -> RangeSlider

    Parameters

    value

    the value to be used as right shadow offset.

  • Set left shadow radius.

    Declaration

    Swift

    public func rightShadowRadius(_ value: CGFloat) -> RangeSlider

    Parameters

    value

    the value to be used as left shadow radius.

  • Set right knob gradient color 1. The value received is converted to a UIColor.

    Declaration

    Swift

    public func rightKnobGradientColor1(_ value: Color) -> RangeSlider

    Parameters

    value

    the value to be used as right knob gradient color 1.

  • Set right knob gradient color 2. The value received is converted to a UIColor.

    Declaration

    Swift

    public func rightKnobGradientColor2(_ value: Color) -> RangeSlider

    Parameters

    value

    the value to be used as right knob gradient color 2.

  • Set right knob gradient start point.

    Declaration

    Swift

    public func rightKnobGradientStartPoint(_ value: CGPoint) -> RangeSlider

    Parameters

    value

    the value to be used as right shadow radius.

  • Set right knob gradient end point.

    Declaration

    Swift

    public func rightKnobGradientEndPoint(_ value: CGPoint) -> RangeSlider

    Parameters

    value

    the value to be used as right knob gradient end point.

  • Set right knob border width.

    Declaration

    Swift

    public func rightKnobBorderWidth(_ value: CGFloat) -> RangeSlider

    Parameters

    value

    the value to be used as right knob border width.

  • Set right knob border color. The value received is converted to a UIColor.

    Declaration

    Swift

    public func rightKnobBorderColor(_ value: Color) -> RangeSlider

    Parameters

    value

    the value to be used as right knob border color.

  • Set knobs labels font size.

    Declaration

    Swift

    public func knobsLabelFontSize(_ value: CGFloat) -> RangeSlider

    Parameters

    value

    the value to be used as font size for the knobs labels.

  • Set knobs labels color.

    Declaration

    Swift

    public func knobsLabelFontColor(_ value: Color) -> RangeSlider

    Parameters

    value

    the value to be used asknobs labels color.

  • Set knobs labels number of decimal.

    Declaration

    Swift

    public func knobsLabelNumberOfDecimal(_ value: Int) -> RangeSlider

    Parameters

    value

    the value to be used as number of decimal format for knobs labels.

  • Set bar height.

    Declaration

    Swift

    public func barHeight(_ value: CGFloat) -> RangeSlider

    Parameters

    value

    the value to be used as bar height.

  • Set bar width.

    Declaration

    Swift

    public func barLeading(_ value: CGFloat) -> RangeSlider

    Parameters

    value

    the value to be used as bar width.

  • Set bar trailing.

    Declaration

    Swift

    public func barTrailing(_ value: CGFloat) -> RangeSlider

    Parameters

    value

    the value to be used as bar trailing.

  • Set bar corners.

    Declaration

    Swift

    public func barCorners(_ value: CGFloat) -> RangeSlider

    Parameters

    value

    the value to be used as bar corners.

  • Set bar shadow opacity.

    Declaration

    Swift

    public func barShadowOpacity(_ value: Float) -> RangeSlider

    Parameters

    value

    the value to be used as bar shadow opacity.

  • Set bar shadow color.

    Declaration

    Swift

    public func barShadowColor(_ value: Color) -> RangeSlider

    Parameters

    value

    the value to be used as bar shadow color.

  • Set bar shadow offset.

    Declaration

    Swift

    public func barShadowOffset(_ value: CGSize) -> RangeSlider

    Parameters

    value

    the value to be used as bar shadow offset.

  • Set bar shadow radius.

    Declaration

    Swift

    public func barShadowRadius(_ value: CGFloat) -> RangeSlider

    Parameters

    value

    the value to be used as bar shadow radius.

  • Set bar border width.

    Declaration

    Swift

    public func barBorderWidth(_ value: CGFloat) -> RangeSlider

    Parameters

    value

    the value to be used as bar border width.

  • Set bar border color.

    Declaration

    Swift

    public func barBorderColor(_ value: Color) -> RangeSlider

    Parameters

    value

    the value to be used as bar border color.