Search code examples
iosobjective-cuiscrollviewautolayoutsize-classes

Existing app needs UIScrollView when using Size Classes


I have an iPad app that is written for Portrait mode; I am trying to add Landscape mode to it using Auto Layout. Everything appears to work just by changing the Size Classes in XCode, except some of the pages are longer when displayed in Landscape mode. My thoughts are to just add a UIScrollView to each page that needs it, at the top of the view hierarchy.

Is this the preferred method of solving this issue?


Solution

  • Yes, when designing an app for both landscape and portrait orientations you usually will need to make the content scrollable in landscape orientation.

    You can also create a different layout for the landscape orientation and completely re-layout the UI components when the app rotates, but for simplicity putting all of your objects in a scroll view will solve your issue of limited real estate on the screen.