How to set UICollectionViewCell Width and Height programmatically
<p>I am trying to implement a <code>CollectionView</code>.
When I am using Autolayout, my cells won't change the size, but their alignment.</p>
<p>Now I would rather want to change their sizes to e.g.</p>
<pre><code>var size = CGSize(width: self.view.frame.width/10, height: self.view.frame.width/10)
</code></pre>
<p>I tried setting in my <code>CellForItemAtIndexPath</code></p>
<pre><code>collectionCell.size = size
</code></pre>
<p>it didn't work though.</p>
<p>Is there a way to achieve this?</p>
<p><strong>edit</strong>:</p>
<p>It seems, that the answers will only change my CollectionView width and height itself. Is there are conflict in Constraints possible? Any ideas on that ?</p>