Slider - admiral-team/admiralui-ios GitHub Wiki

Class

A control for selecting a single value from a continuous range of values


Declaration

public final class Slider: UIControl, AnyAppThemable

Overview

Component present a view with thumb image and line of progress. You can also control current value of Slider.

Live example

Configure a Slider

let slider = Slider()

Tracking slider value changes

let slider = Slider()
slider.addTarget(self, action: #selector(sliderDidChange(_:)), for: .valueChanged)

@objc private func sliderDidChange(_ slider: Slider) {
    print(slider.value)
}

Update min and max value of slider

slider.minimumValue = 0
slider.maximumValue = 1000

Update current value of slider

slider.value = 500

Contribution

You can help us to find bugs or ask us to add features.

  • To start issue please use ready-made templates.
  • To make changes to the repository, you need to create a fork of the project, make changes to the code and create a pull request in our project. You can read more about this in the Github documentation.