0

I have 2 CollectionViews and 1 TableView in a StackView that is part of a dashboard display. None of these display if I dont set the heights for these items explicitly as constraints.

I've tried some of other solutions here but none of them really work, the best I could find is: Link: Set height of table based on number of rows but it doesn't work for CollectionViews since CollectionViews don't have rows and .numberOfItems(inSection: 0) does nothing

Brewski
  • 654
  • 3
  • 14
  • 29

1 Answers1

0

Try to fix the Stack View constraint with specific height and set that the Stack View will be equally Fill. This means that the 2 CV and the TV will have the same Height.

Also you can set the contraint to each one and then with the outlet of these constraints you can change them programmatically every time you want.