Skip to content

Commit

Permalink
Merge pull request #170 from muukii/patch-1
Browse files Browse the repository at this point in the history
Fix minimumInteritemSpacing
  • Loading branch information
chiahsien authored May 23, 2017
2 parents 49a9785 + f00bbad commit 94755eb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CHTCollectionViewWaterfallLayout.swift
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,14 @@ public class CHTCollectionViewWaterfallLayout : UICollectionViewLayout{
/*
* 1. Get section-specific metrics (minimumInteritemSpacing, sectionInset)
*/
var minimumInteritemSpacing : CGFloat
let minimumInteritemSpacing : CGFloat
if let miniumSpaceing = self.delegate?.collectionView?(self.collectionView!, layout: self, minimumInteritemSpacingForSectionAtIndex: section){
minimumInteritemSpacing = miniumSpaceing
}else{
minimumInteritemSpacing = self.minimumColumnSpacing
minimumInteritemSpacing = self.minimumInteritemSpacing
}

var sectionInsets : UIEdgeInsets
let sectionInsets : UIEdgeInsets
if let insets = self.delegate?.collectionView?(self.collectionView!, layout: self, insetForSectionAtIndex: section){
sectionInsets = insets
}else{
Expand All @@ -188,7 +188,7 @@ public class CHTCollectionViewWaterfallLayout : UICollectionViewLayout{
/*
* 2. Section header
*/
var heightHeader : CGFloat
let heightHeader : CGFloat
if let height = self.delegate?.collectionView?(self.collectionView!, layout: self, heightForHeaderInSection: section){
heightHeader = height
}else{
Expand Down

0 comments on commit 94755eb

Please sign in to comment.