0
votes

I have a screen in interface builder that consists of a UI Collection View containing reusable cells. I've used Interface builder to add Auto Layout constraints to the UI Collection view and its scaling and moving about on each device like it should. How can I use the same method (control dragging) to auto layout the cells width and height? I can get constraint options via control dragging for the child objects in the cell to the cell but not from the cell to say the UI Collection View.

Any help greatly appreciated!

Thanks.

1
You cannot use auto layout to set the size of a cell, and the size of cells cannot influence the size of the collection view. So it's a bit hard to see what you're after here.matt

1 Answers

0
votes

You don't. Collection views manage the placement of the cells within the view themselves, using their own rules. You can certainly use AutoLayout to determine the size and placement of the entire collection view, and you can use it for the internal layout of individual cells, but you can't use AutoLayout to size or position the cells within the collection view.