- August 28, 2025
- Mins Read
TvOSSlider is an implementation of UISlider for tvOS.
TvOSSlider palliates missing an implementation of UISlider for tvOS as part of UIKit.
We think that Apple might eventually include UISlider for tvOS as part of UIKit, because of that, and in order to make it easier to migrate to a possible future UIKit component, TvOSSlider has been implemented with the same public API as UISlider for iOS.
The interface only differs in a couple of new properties that were considered needed for a Big Screen implementation:
import UIKit
import TvOSSlider
class ViewController: UIViewController {
@IBOutlet private weak var slider: TvOSSlider!
@IBOutlet private weak var valueLabel: UILabel!
override func viewDidLoad() {
super.viewDidLoad()
slider.addTarget(self, action: #selector(sliderValueChanges), for: .valueChanged)
slider.minimumValue = 0
slider.maximumValue = 100
slider.stepValue = 10
slider.minimumTrackTintColor = .orange
}
@objc
func sliderValueChanges(slider: TvOSSlider) {
valueLabel.text = “\(slider.value)”
}
}
Podfile
:
source ‘https://github.com/CocoaPods/Specs.git’
platform :tvos, ‘11.0’
use_frameworks!
target ‘<Your Target Name>’ do
pod ‘TvOSSlider’, :git => ‘https://github.com/zattoo/TvOSSlider.git’
end
$ brew update
$ brew install carthage
github “zattoo/TvOSSlider” ~> 1.2.0
This package provides you with an easy way to show tooltips over any SwiftUI view, since Apple does not provide ...
SimpleToast is a simple, lightweight, flexible and easy to use library to show toasts / popup notifications inside iOS or ...
Create Toast Views with Minimal Effort in SwiftUI Using SSToastMessage. SSToastMessage enables you to effortlessly add toast notifications, alerts, and ...