I'm showing some photos with a NSCollectionView in FlowLayout. This works fine. Then I wanted to use dynamic width for each item for better distribution of the images when some are landscape and some are portrait.
So I implemented the collectionView(_:layout:sizeForItemAt:)
to return sizes.
And now I have a strange behaviour on rows with less items then is space available. Sometimes the lines are filled from left to right with great spacing between the images (justify) and sometimes they are just half filled rows with the defined minimum item spacing (left aligned).
I like the left aligned version, but reading the docs the justified version should be the correct one. But why it is randomly sometimes this and sometimes the other way?
How can I do something against it?
Do I have to implement my own custom flow layout, or is there a explanation and solution for this strange behaviour?
Mininum spacing and margins are set static, only the cellsize is dynamically. And not using dynamic cell size it just works fine.