suppose have 1 item in collection view, item centered in collection view on first row.
and multiple items, these items distributed horizontally in collection view appropriate spacing between them.
if size of collection view changed, spacing between items changed simultaneously fit new size of collection view.
the default behavior of nscollectionview
aligns items @ left, without spacing between multiple items.
should use layoutmanager
of collection view's layer layout items?
since using data binding provide items, seems not easy insert constraints.
you can create subclass of nscollectionviewlayout , implements layoutattributes methods accordingly.
Comments
Post a Comment