title: Proper way to set constraints of collection view inside of table view cell
body: <p>I am wondering the proper way to set the constraints on this. I have a collection view inside of a table view cell as a way to swipe between images that the user posts. Each post (tableview cell) can contain multiple images (Which are each posted in the collection view). I am going for a similar style as instagram has where you can swipe between images. The problem I am having is when I set constraints on the collection view and image view they don't change between devices. It seems the only way to do it is manually change the size of the collection view cell and image view depending on the device the user is using. Any alternative way to achieve the look I am trying to accomplish would be appreciated as well. </p>
  
  <p><a href="https://i.stack.imgur.com/gDJhl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gDJhl.png" alt="Here are the constraints set on the collection view"></a></p>
  
  <p>Here are the constraints set on the collection view</p>
  
  <p><a href="https://i.stack.imgur.com/dGPfk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dGPfk.png" alt="enter image description here"></a></p>
  
  <p>Here is how the post looks on an iPhone SE</p>
  
  <p><a href="https://i.stack.imgur.com/iUftA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iUftA.png" alt="enter image description here"></a></p>
  
  <p>Here is how the post is supposed to look on the iPhone 8 Plus
  <a href="https://i.stack.imgur.com/yEs2T.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yEs2T.png" alt="enter image description here"></a></p>
  
  <p>Overall post on the storyboard in interface builder.
  <a href="https://i.stack.imgur.com/Xipmp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Xipmp.png" alt="enter image description here"></a></p>
  
  <p>Here are the constraints set on the image, which is inside the collection view.</p>