TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Nov 2017 |
SwiftSwift Version | 3.2 |
SPMSupports SPM | ✗ |
Maintained by wentianen.
WTCarouselFlowLayout is flow layout for UICollectionView.
WTCarouselFlowLayoutBaselineType.top
WTCarouselFlowLayoutBaselineType.center
WTCarouselFlowLayoutBaselineType.bottom
layout.itemSpacing = -15
Via code
import WTCarouselFlowLayout
Create a WTCarouselFlowLayout object, set its itemSize and assign it to your UICollectionView.
let layout = self.collectionView.collectionViewLayout as! WTCarouselFlowLayout
layout.itemSize = CGSize(width: 70, height: 100)
layout.scrollDirection = .horizontal
layout.itemSpacing = 15
// layout.itemSpacing = -15
layout.sideItemScale = 0.7
layout.sideItemAlpha = 0.7
layout.sideItemBaselineType = .center
layout.sideItemOffset = 0.0
iOS UICollectionView 卡片效果 传送带效果
wentianen, [email protected]
WTCarouselFlowLayout is available under the MIT license. See the LICENSE file for more info.