title: Auto Layout size of CollectionViewCell in relation to CollectionView
body: <p>I have a CollectionViewCell placed in a CollectionView. The size of the CollectionView is set via Auto Layout and can change at times.</p>
  
  <p>I want to (programmatically) set constraints on my CollectionView, so that the size of the CollectionViewCell is responsive to the size of the CollectionView (Say the width of the Cell is equal to the width of the CollectionView-100 and the height should be equal).</p>
  
  <p><strong>How can I declare constraints between the Cell and the CollectionView?</strong></p>
  
  <p>When, where and how do set those constraints? Do I have to call setNeedsLayout on the Cells when the size of the CollectionView changes?</p>
  
  <p>I searched for this quite long and all I found was always about changing the size of the Cell according to its content – that’s not what I am trying to do. The only hint that I got is that I might have to subclass CollectionViewLayout – but I’m not sure about that.</p>
  
  <p>Any help is appreciated!</p>