GithubHelp home page GithubHelp logo

ehynds / ouroboros Goto Github PK

View Code? Open in Web Editor NEW

This project forked from willowtreeapps/ouroboros

0.0 2.0 0.0 48.96 MB

Infinitely scrolling carousel for tvOS

License: MIT License

Swift 91.25% Objective-C 2.68% Ruby 6.07%

ouroboros's Introduction

Ouroboros, by WillowTree

An infinitely scrolling carousel for tvOS

Installation

You can use this project via CocoaPods with:

pod 'WillowTreeOuroboros'

Without CocoaPods 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!

ouroboros's People

Contributors

chrsmys avatar

Watchers

Eric Hynds avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.