TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Jan 2017 |
Maintained by Parsifal, ParsifalC.
An interesting wheel layout of collection view. Here's the Swift version
iOS7.0 or later.
1.clone this repo;
2.add the source files --'CPCollectionViewWheelLayout.h' and 'CPCollectionViewWheelLayout.m' to your project.
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])];
MIT