RouletteWheelCollectionViewDemo
Demo of a custom UICollectionViewFlowLayout subclass implementation of a roulette wheel of cards, in the style of the Yahoo TimeTraveler app.
Install / Use
/learn @kenshin03/RouletteWheelCollectionViewDemoREADME
RouletteWheelCollectionViewDemo
Demo of a custom UICollectionViewFlowLayout subclass implementation of a roulette wheel of cards, in the style of the Yahoo TimeTraveler app.
For details please refer to: http://corgitoergosum.net/?p=1296
License
MIT (https://github.com/kenshin03/RouletteWheelCollectionViewDemo/blob/master/LICENSE)
Screenshot

Usage
- Import
RVCollectionViewCell.handRVCollectionViewLayout.hin your class. - Create a
UICollectionViewinstance, and useRVCollectionViewLayout.has the layout class. - Implement the necessary
UICollectionViewDataSourceandUICollectionViewDelegateFlowLayoutmethods. - Prepare your own data source.
Example Code
DemoViewController.m:
#import "RVCollectionViewCell.h"
#import "RVCollectionViewLayout.h"
@interface RVViewController ()<UICollectionViewDataSource, UICollectionViewDelegateFlowLayout>
...
/* inits the layout object and sets it to your uicollectionview via setCollectionViewLayout: */
[self.collectionView registerClass:[RVCollectionViewCell class] forCellWithReuseIdentifier:@"ItemIdentifier"];
self.collectionViewLayout = [[RVCollectionViewLayout alloc] init];
self.collectionViewLayout.superView = self.view;
[self.collectionView setCollectionViewLayout:self.collectionViewLayout];
...
/* In cellForItemAtIndexPath:, return an instance of RVCollectionViewCell */
-(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
RVCollectionViewCell *cell = (RVCollectionViewCell *)[collectionView dequeueReusableCellWithReuseIdentifier:@"ItemIdentifier" forIndexPath:indexPath];
cell.imageView = self.imagesArray[indexPath.item];
return cell;
}
Attribution
The card images are works of yozzo from DeviantArts - http://yozzo.deviantart.com/
Related Skills
node-connect
344.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
96.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
344.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
344.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
