Skip to content

We can add boundary indicators to this slider, like ads, similar to those found in video sliders on many OTT platforms.

License

Notifications You must be signed in to change notification settings

AnbalaganD/BoundarySlider

Repository files navigation

BoundarySlider

Version Licence Platform

Slider

Feature

  1. Multiple boundary
  2. Buffer view like youtube video buffer
  3. Seek support
  4. Customizable thumb image (Not yet)
  5. Haptic support if reach boundary (Not yet)
  6. Min, Max value label (Not yet)
  7. Min, Max value label position like top, middle, bottom (Not yet)

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

CocoaPods

BoundarySlider is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'BoundarySlider'

Swift Package manager (SPM)

BoundarySlider is available through SPM. Use below URL to add as a dependency

dependencies: [
    .package(url: "https://github.com/AnbalaganD/BoundarySlider", .upToNextMajor(from: "0.1.1"))
]

Usage

import BoundarySlider

// Configure
let boundarySlider = BoundarySlider()
boundarySlider.minimumValue = 0.0
boundarySlider.maximumValue = 100.0
boundarySlider.trackColor = .gray
boundarySlider.fillTrackColor = .red
boundarySlider.bufferTrackColor = .init(white: 1.0, alpha: 0.6)
boundarySlider.boundaryColor = .yellow
boundarySlider.boundaries = [
    12, 33, 45, 60, 76, 90, 99
]

// Change fill tracker value
boundarySlider.value = 50.0

// Changes Buffer value
boundarySlider.bufferValue = 60.0

Author

Anbalagan D

License

BoundarySlider is available under the MIT license. See the LICENSE file for more info.

About

We can add boundary indicators to this slider, like ads, similar to those found in video sliders on many OTT platforms.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published