title: How to change UICollectionViewCell size programmatically in Swift?
body: <p>I have a <code>UICollectionView</code> with a <code>segmented control</code> to switch between data. But how do I change the <code>UICollectionViewCell</code> size properties <strong>programmatically</strong> ? then I can custom each style appropriately for each data type. </p>
  
  <p><strong>For example</strong> change the width to 520 points and height to 100. I am new to iOS development and am experienced with CSS :/</p>
  
  <p>I know how to do it in Xcode (obviously) but do not know the correct methods to change it in swift. Any ideas or feedback is much appreciated (Y)</p>
  
  <p><a href="https://i.stack.imgur.com/BMy4O.png" rel="noreferrer"><img src="https://i.stack.imgur.com/BMy4O.png" alt="enter image description here"></a></p>