I have a collection view which displays cells looking like a classic table view with image, title and subtitle.
I want to be able to switch the layout to a grid showing only the images, 3 in a row.
The content of the collection view cell is layouted in a storyboard with auto layout. The imageView has the following constraints:
- Leading 0 to the left cell edge
- Top 0 to the top cell edge
- Bottom 0 to the bottom cell edge
- Fixed width
- Horizontal space to the labels
After the layout change the imageView should have constraints of zero to all edges of the container, so that it fills it completely.
At the moment when I change the layout the app crashes with Unable to simultaneously satisfy constraints.
. What is the best way to fix the constraints when the layout is changed, maybe even replace the cell class?