myt446 / LoopedContentsView

View to display looped contents.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LoopedContentsView

Swift Carthage compatible Platform License

README for other languages
Russian

Overview

LoopedContentsView display and handle infinite looped contents. LoopedContentsView can bear very fast scroll!

Usage

Delegate / DataSource

LoopedContentsView needs delegate and datasource like UITableView/UICollectionView.

Delegate

Required

func loopedContentsView(loopedContentsView: LoopedContentsView, lengthOfContentAtIndex index: Int) -> CGFloat

Optional

func loopedContentsView(loopedContentsView: LoopedContentsView, willSelectContentAtIndex index: Int)
func loopedContentsView(loopedContentsView: LoopedContentsView, didSelectContentAtIndex index: Int)
func loopedContentsView(loopedContentsView: LoopedContentsView, willDeselectContentAtIndex index: Int)
func loopedContentsView(loopedContentsView: LoopedContentsView, didDeselectContentAtIndex index: Int)
func loopedContentsView(loopedContentsView: LoopedContentsView, willDisplayCell cell: LoopedContentsViewCell, forItemAtIndex index: Int)
func loopedContentsView(loopedContentsView: LoopedContentsView, didEndDisplaying cell: LoopedContentsViewCell, forItemAtIndex index: Int)
func loopedContentsView(loopedContentsView: LoopedContentsView, didFocusCell cell: LoopedContentsViewCell, forItemAtIndex index: Int)

DataSource

Required

func loopedContentsViewNumberOfContents(loopedContentsView: LoopedContentsView) -> Int
func loopedContentsView(loopedContentsView: LoopedContentsView, cellAtIndex index: Int) -> LoopedContentsViewCell

Register Cell Class

You can register cell class.

loopedContentsView.registerClass(class: {Name of Cell Class}.self, forCellReuseIdentifier: "{Identifier}")

Example

LoopedContentsViewExample

License

LoopedContentsView is released under the MIT license. See LICENSE for details.

About

View to display looped contents.

License:MIT License


Languages

Language:Swift 98.5%Language:Objective-C 1.5%