WTCarouselFlowLayout 0.3.0

WTCarouselFlowLayout 0.3.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Nov 2017
SwiftSwift Version 3.2
SPMSupports SPM

Maintained by wentianen.



WTCarouselFlowLayout

WTCarouselFlowLayout is flow layout for UICollectionView.

  • WTCarouselFlowLayoutBaselineType.top

    image

  • WTCarouselFlowLayoutBaselineType.center

    image

  • WTCarouselFlowLayoutBaselineType.bottom

    image

  • layout.itemSpacing = -15

    image

Requirements

  • iOS 8.0+

Example

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

detail

iOS UICollectionView 卡片效果 传送带效果

Author

wentianen, [email protected]

License

WTCarouselFlowLayout is available under the MIT license. See the LICENSE file for more info.