- July 26, 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
NavigationKit is a lightweight library which makes SwiftUI navigation super easy to use. 💻 Installation 📦 Swift Package Manager Using Swift Package Manager, add ...
An alternative SwiftUI NavigationView implementing classic stack-based navigation giving also some more control on animations and programmatic navigation. NavigationStack Installation ...
With SwiftUI Router you can power your SwiftUI app with path-based routing. By utilizing a path-based system, navigation in your app becomes ...
This package takes SwiftUI's familiar and powerful NavigationStack API and gives it superpowers, allowing you to use the same API not just ...