CHTCollectionViewWaterfallLayout icon indicating copy to clipboard operation
CHTCollectionViewWaterfallLayout copied to clipboard

Inter item spacing is grater than mentioned value

Open rahul1485 opened this issue 8 years ago • 4 comments

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)

simulator screen shot 06-apr-2016 15 41 48

rahul1485 avatar Apr 06 '16 10:04 rahul1485

Are you using the CHTCollectionViewWaterfallLayout.h/.m or .swift version?

chiahsien avatar Apr 07 '16 08:04 chiahsien

I am using .h/.m

rahul1485 avatar Apr 07 '16 08:04 rahul1485

I have the same problem, please add a solution.

thatmarcel avatar Jun 18 '18 16:06 thatmarcel

same with you

ofshellohicy avatar Aug 04 '20 09:08 ofshellohicy