Skip to content

liang37038/RLWaterfallFlowlayout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

RLWaterfallFlowlayout

Usage

  1. Init flowLayout and setup some params.
let waterFlowLayout = RLWaterfallFlowLayout()
waterFlowLayout.columnCount = 3
waterFlowLayout.sectionInset = UIEdgeInsets(top: 20, left: 10, bottom: 20, right: 10)
waterFlowLayout.columSpacing = 10
waterFlowLayout.rowSpacing = 10
waterFlowLayout.delegate = self

2.Make ViewController extends RLWaterfallFlowLayoutDelegate and implement delegate methods

func itemHeight(_ collectionView: UICollectionView?, indexPath: IndexPath) -> CGFloat {
    return itemHeight[indexPath.item]
}

3.ScreenShot

About

A waterfall flowlayout for CollectionView (Swift)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages