Autolayout problems

Hi everybody,

I’ve a UISplitViewController that has like Master a UIViewcontroller in which I create a collection view with 4 cells. This cell are big like collection view, without any space between, in horizontal scroll, and with paging activated.

When the phone is in portrait or directly in landscape, all works well. but when I pass between portraits and landscape the problems come out.

le cell doesn’t resize correctly.

I say that because, the problem starts when I insert the view controller in a splitviewcontroller.

here some screenshot

Photo 1
This photo is when the app starts
Photo 2
This is first swipe on collectionview (the next cell is green)
Photo 3
This is when I rotate the cell in landscape
Photo 4
This when I come bak in portrait

If you want to check the code here there is the project that reproduce the problem

collectionViewLayout test.zip (70.5 KB)

Thank you very much for your help

@rufy Do you still have issues with this?