fuzz-productions/FZCarousel


FZCarousel provides a straightforward, lightweight interface for producing an "infinitely" scrolling carousel in iOS apps.

License: MPL-2.0

Language: Objective-C


FZCarousel

Demo

demo

Introduction

FZCarouselCollectionViewDelegate provides a straightforward, lightweight interface for producing an "infinitely" scrolling carousel.

Usage

Implementing a subclass

Users of this class should begin by subclassing it. Subclasses should handle all UICollectionViewDataSource, UICollectionViewDelegateFlowLayout, and UICollectionViewDelegate methods that need to be overwritten to produce the desired collectionView layout. At minimum, it is expected that users will overwrite -collectionView:cellForItemAtIndexPath:, and an exception will be thrown if this is not the case.

This class, in turn, will handle all "carousel concerns," which include manipulation and syncing of the data array, page control updates, and, of course, carousel cranking.

Standard Configuration

self.carouselCollectionViewDelegate = [FZDemoCarouselCollectionViewDelegate carouselCollectionViewDelegateForCollectionView:self.collectionView dataArray:self.dataArray defaultCrankInterval:2.0f lazyCrankInterval:2.5f];

Responding to cell selection

self.carouselCollectionViewDelegate.didSelectCellBlock = 
^(UICollectionView *inCollectionView, NSIndexPath *inIndexPath, id inDataForIndexPath)                          
{                                               
    [tmpSelf showSelectionIndicator:YES withData:inDataForIndexPath];
};

Controlling the carousel

[self.carouselCollectionViewDelegate beginCarousel];
[self.carouselCollectionViewDelegate endCarousel];

Project Statistics

Sourcerank 4
Repository Size 1.68 MB
Stars 20
Forks 4
Watchers 26
Open issues 0
Dependencies 0
Contributors 2
Tags 3
Created
Last updated
Last pushed

Top Contributors See all

nononoah Sheng Jun Dong

Packages Referencing this Repo

FZCarousel
FZCarouselCollectionViewDelegate provides a straightforward, lightweight interface for producing ...
Latest release 0.1.2 - Updated - 20 stars

Recent Tags See all

0.1.2 August 17, 2015
0.1.1 August 17, 2015
0.1.0 January 09, 2015

Something wrong with this page? Make a suggestion

Last synced: 2016-05-27 13:51:44 UTC

Login to resync this repository