CHTCollectionViewWaterfallLayout
CHTCollectionViewWaterfallLayout copied to clipboard
Inter item spacing is grater than mentioned value
I put the 10 as minimumInteritemSpacing, but collection view is taking more than 10.
My code:-
let layout = CHTCollectionViewWaterfallLayout()
layout.sectionInset = UIEdgeInsetsMake(0, 10, 0, 10);
layout.headerHeight = 250;
layout.footerHeight = 0;
layout.minimumColumnSpacing = 10;
layout.minimumInteritemSpacing = 10;
layout.columnCount = 2
self.collectionviewAllPoints = UICollectionView(frame: self.view.frame, collectionViewLayout: layout)
self.collectionviewAllPoints.autoresizingMask = [.FlexibleHeight,.FlexibleWidth]
self.collectionviewAllPoints.dataSource = self;
self.collectionviewAllPoints.delegate = self;
self.collectionviewAllPoints.backgroundColor = UIColor.whiteColor();
self.collectionviewAllPoints.layer.borderColor = UIColor.greenColor().CGColor
self.collectionviewAllPoints.layer.borderWidth = 1.0
self.view.addSubview(self.collectionviewAllPoints)
Are you using the CHTCollectionViewWaterfallLayout.h/.m
or .swift
version?
I am using .h/.m
I have the same problem, please add a solution.
same with you