CPCollectionViewWheelLayout 1.0.3

CPCollectionViewWheelLayout 1.0.3

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Jan 2017

Maintained by Parsifal, ParsifalC.




  • By
  • ParsifalC

An interesting wheel layout of collection view. Here's the Swift version

Overview

Requirements

iOS7.0 or later.

Installation

Manually:

1.clone this repo;

2.add the source files --'CPCollectionViewWheelLayout.h' and 'CPCollectionViewWheelLayout.m' to your project.

Usage

    CPCollectionViewWheelLayout *wheelLayout =
    [[CPCollectionViewWheelLayout alloc] initWithRadius:self.view.bounds.size.width/1.8
                                               cellSize:CGSizeMake(60, 60)
                                                angular:20
                                                fadeAway:NO
                                              layoutType:self.layoutType];

    UICollectionView *collectionView = 
    [[UICollectionView alloc] initWithFrame:CGRectMake(0, 64, self.view.bounds.size.width, self.view.bounds.size.height-64) collectionViewLayout:wheelLayout];
    collectionView.showsVerticalScrollIndicator = NO;
    collectionView.showsVerticalScrollIndicator = NO;
    collectionView.backgroundColor = [UIColor clearColor];
    collectionView.dataSource = self;
    collectionView.delegate = self;
    [collectionView registerClass:[CPCollectionViewCell class]
       forCellWithReuseIdentifier:NSStringFromClass([CPCollectionViewCell class])];

License

MIT