Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jinSasaki/TVKit
UI components for tvOS
https://github.com/jinSasaki/TVKit
carthage swift tvos
Last synced: 28 days ago
JSON representation
UI components for tvOS
- Host: GitHub
- URL: https://github.com/jinSasaki/TVKit
- Owner: jinSasaki
- License: mit
- Created: 2016-05-11T06:35:57.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-03T08:23:15.000Z (over 7 years ago)
- Last Synced: 2024-04-26T00:42:23.477Z (8 months ago)
- Topics: carthage, swift, tvos
- Language: Swift
- Size: 25.7 MB
- Stars: 19
- Watchers: 4
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TVKit
UI components for tvOS.NOTE: This repository is work in progress.
## Features
- Highly customizable
- Supports @IBDesignable to live-render the component in the Interface Builder
- By supporting @IBInspectable, the class properties can be exposed in the Interface Builder, and you can edit these properties in realtime- Components:
- Slider: Inspired `UISlider`## Installation
### CocoaPods```Podfile
pod 'TVKit'
```### Carthage
```Cartfile
github "jinSasaki/TVKit"
```## Components
### Slider
![slider](https://github.com/jinSasaki/TVKit/raw/master/Assets/slider.gif)```swift
class ViewController: UIViewController {
@IBOutlet private weak var slider: Slider!override func viewDidLoad() {
super.viewDidLoad()// Customize value, max and min (you can also customize in InterfaceBuilder).
slider.min = 0.0
slider.max = 1000
slider.value = 100// Customize visual with label, imageView and so on.
slider.leftImageView.image = UIImage(named: "rewind")
slider.rightImageView.image = UIImage(named: "skip")
slider.leftLabel.hidden = true
slider.rightLabel.textColor = UIColor.redColor()
}
}
```Implement `SliderDelegate` if you want to receive event from Slider.
```swift
// slider.delegate = self
extension ViewController: SliderDelegate {
func slider(_ slider: Slider, textWithValue value: Double) -> String {
// Customize text on the seeker view with value.
return "\(Int(value))"
}func sliderDidTap(_ slider: Slider) {
// Do something
}func slider(_ slider: Slider, didChangeValue value: Double) {
// Do something
}
}
```## Requirements
- tvOS 9.2+
- Xcode 9
- Swift 4## TODO
- Components
- Stepper
- Switch
- FocusableLabel- Installation
- Carthage
- Swift Package Manager## License
TVKit is released under the MIT license. See LICENSE for details.