https://github.com/willowtreeapps/ouroboros
Infinitely scrolling carousel for tvOS
https://github.com/willowtreeapps/ouroboros
Last synced: about 1 year ago
JSON representation
Infinitely scrolling carousel for tvOS
- Host: GitHub
- URL: https://github.com/willowtreeapps/ouroboros
- Owner: willowtreeapps
- License: mit
- Created: 2015-10-21T21:19:24.000Z (over 10 years ago)
- Default Branch: develop
- Last Pushed: 2018-11-05T02:27:49.000Z (over 7 years ago)
- Last Synced: 2024-11-20T19:06:14.481Z (over 1 year ago)
- Language: Swift
- Homepage:
- Size: 55 MB
- Stars: 48
- Watchers: 52
- Forks: 22
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Ouroboros, by WillowTree
[](https://github.com/Carthage/Carthage)
### *An infinitely scrolling carousel for tvOS*

## Installation
You can use this project via CocoaPods:
```ruby
pod 'WillowTreeOuroboros'
```
Or via Carthage:
```ruby
github "willowtreeapps/ouroboros" >= 0.2.1
```
Or you can simply copy the `InfiniteCarousel.swift` file into
your project.
## Usage
See the enclosed `OuroborosExample` application for a working demo.
If you're using a storyboard, simply change your collection view class to
`InfiniteCarousel`. Make sure you're using a horizontally scrolling collection
view with a flow layout, and make sure the flow layout's item size and minimum
line spacing are both set.
If you wish to center on more than one item at a time, be sure to update
`itemsPerPage`.
If you wish for the carousel to auto-scroll, set `autoScroll` and the two
related timers (in seconds).
## Notes
* Your carousel will work best if the total number of items you display is evenly
divisible by the number of items per page (`count % itemsPerPage == 0`).
* This carousel only supports a single section with homogenous sizes and
interline items.
* This carousel currently only scrolls horizontally.
* The carousel overrides setters to become its own data source and delegate.
If you need to do any extra datasource or delegate work you must subclass
and access the `rootDataSource` and `rootDelegate` instances.
* You must use a `UICollectionViewFlowLayout` with the carousel, and you must
set up the item sizes and line spacing with its instance variables.
### WillowTree is Hiring!
Want to write amazing tvOS apps? Want to write amazing iOS apps?
[Check out our openings!](http://willowtreeapps.com/careers/)
### Version History
0.2.1
Update to Swift 3.0 syntax.