NSScreencast Episode #46 Fun with UICollectionView
Fun with UICollectionView - NSScreencast
いろいろな形、レイアウトでCollectionViewを表示
- UICollectionView
- cellForItemAtIndexPath
- Custom collection view cell (subclass)
- @interface NumberCell : UICollectionViewCell
- initWithFrame
- viewDidLoad
- [self.collectionView registerClass:[NumberCell class] forReuseIdentifier:@"cell"];
- @interface NumberCell : UICollectionViewCell
- UICollectionViewFlowLayout
- flowLayout.itemSize
- flowLayout.minimumLineSpacing
- flowLayout.minimumInterItemSpacing = 1;
- self.scrollDirection = UICollectionViewScrollDirectionHorizontal;
- layoutAttributesForElementsInRect
- shouldInvalidateLayoutForBoundsChange
- Circle layout
- Wave layout
- 縦長 横に並べる 縦の位置をずらす