- July 11, 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
A SwiftUI View that emits confetti with user-defined shapes, images, and text.
A colour wheel made all in SwiftUI. There are 2 different colour wheels to choose from. The first main one ...
A color picker implementation with color wheel appearance written in plain SwiftUI. It is compatible with UIColor and NSColor.
This repository is no longer maintained. Here's why: with the release of iOS 16 SwiftUI now enables most of the ...