FlowKit icon indicating copy to clipboard operation
FlowKit copied to clipboard

Avoid FlowCollectionDirector to reset sectionInset, minimumInteritemSpacing and minimumLineSpacing of UIColletionViewLayout

Open wow-such-amazing opened this issue 6 years ago • 3 comments

Why do you clean some layout properties after initialising FlowCollectionDirector?

		self.layout?.sectionInset = .zero
		self.layout?.minimumInteritemSpacing = CGFloat.leastNormalMagnitude
		self.layout?.minimumLineSpacing = 0

wow-such-amazing avatar Nov 12 '18 18:11 wow-such-amazing

Can't this be a problem? Because if I initialise UICollectionView from code, then I need to pass layout into its initialiser. And before doing that I may want to configure somehow my layout. But later when I initialise an adapter some my changes may be overridden

wow-such-amazing avatar Nov 13 '18 08:11 wow-such-amazing

Absolutely true, it was added for test and never removed. My fault, fixed for the next release.

malcommac avatar Nov 20 '18 19:11 malcommac

Thanks 👍

wow-such-amazing avatar Nov 21 '18 10:11 wow-such-amazing