Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cemolcay/TVOSPicker
A sweet horizontal picker view controller for tvOS.
https://github.com/cemolcay/TVOSPicker
apple-tv horizontal-collection-view picker tvos
Last synced: 28 days ago
JSON representation
A sweet horizontal picker view controller for tvOS.
- Host: GitHub
- URL: https://github.com/cemolcay/TVOSPicker
- Owner: cemolcay
- License: mit
- Created: 2017-05-08T21:26:56.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-20T10:38:15.000Z (about 6 years ago)
- Last Synced: 2024-04-24T21:12:26.275Z (8 months ago)
- Topics: apple-tv, horizontal-collection-view, picker, tvos
- Language: Swift
- Size: 633 KB
- Stars: 25
- Watchers: 5
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
TVOSPicker
===A sweet horizontal picker view controller for tvOS.
Demo
----![alt tag](https://github.com/cemolcay/TVOSPicker/blob/master/demo.gif?raw=true)
Requirements
----- Swift 4.0+
- tvOS 9.0+Install
----```
# in your tvOS target
use_frameworks!
pod 'TVOSPicker'
```Usage
----There are two ways to use this library.
- First one is with traditional ways, create either programmatically or from storyboard, a `TVOSPickerViewController` instance and implement its delegate methods, set `dataSource`, `titleLabel` and `subtitleLabel` texts.
- Other one is call `presentPicker(title:subtitle:dataSource:initialSelection:onSelectItem)` on your presenting view controller.
- If your view controller has a navigation controller, than `TVOSPickerViewController` would be pushed by navigation controller and pop after a cancellation or a selection.
- Otherwise, it would be presented modally over the presenting view controller. So, you should be careful when you call it over an already modally presented view controller. I recommend you to wrap it with a navigation controller if you tend to present a picker from a modally presented view controller.