Skip to content

coolryze/WaterfallFlowLayout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WaterfallFlowLayout

License MIT  Platform  Support 

demo

Requirements

This library requires iOS 7.0+, Swift 4 and Xcode 9.0+.

Usage

  1. Init WaterfallFlowLayout && set delegate.
let waterfallFlowLayout = WaterfallFlowLayout()
waterfallFlowLayout.delegate = self
let collectionView = UICollectionView(frame: view.frame, collectionViewLayout: waterfallFlowLayout)
  1. Implements WaterfallFlowLayoutDelegate.
func waterfallFlowLayout(_ layout: WaterfallFlowLayout, heightForItemAtIndexPath indexPath: IndexPath, itemWidth: CGFloat) -> CGFloat
func columnCountInWaterfallFlowLayout(_ layout: WaterfallFlowLayout) -> Int
func columnSpacingInWaterfallFlowLayout(_ layout: WaterfallFlowLayout) -> CGFloat
func rowSpacingInWaterfallFlowLayout(_ layout: WaterfallFlowLayout) -> CGFloat
func edgeInsetsInWaterfallFlowLayout(_ layout: WaterfallFlowLayout) -> UIEdgeInsets

Installation

Add the source file 'WaterfallFlowLayout' to your Xcode project.

License

WaterfallFlowLayout is provided under the MIT license. See LICENSE file for details.

About

collectionView flowLayout

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages