Search code examples
iosipadautolayoutstoryboardsize-classes

iOS Storyboard : Size-Class is changing at runtime for iPad?


I'm using one storyboard for both iPhone and iPad. I wrote my storyboard using Any/Any, as it would match any devices ( some layout are 100% similar between iPad/iPhone ). Now I'm trying to modify the layout for iPad, using Regular/Regular.

On first display, the layout used if using the Regular/Regular, but if I navigate / navigate back or scroll ( it's inside a page view controller ), the layout switches back to Any layout ...

Any clue ??

UPDATE : This seems linked to the UIPageViewController ...


Solution

  • It seems that when embedded in a UIPageViewController, transitions will change constraints using "Any" size class, not matter what the device is.

    So the only solution for me was to create 2 separate storyboards ...