I'm having issues with the constraints in CollectionView.
The view looks perfect at first, but when it is rotated to landscape and then rotated back to portrait, the location changes.
Here is how it looks at first and how it is supposed to look like. https://i.stack.imgur.com/lNqQ8.png
But after I rotate to landscape the device and rotate it back to portrait, this is how it looks. https://i.stack.imgur.com/A8cpZ.png
How can I fix this without messing up the way it looks like when in landscape orientation?
(I don't have enough reputation to post images, hence why the images are in links)