Skip to content

Instantly share code, notes, and snippets.

@fastred
Last active August 29, 2015 14:04
Show Gist options
  • Save fastred/776542c5d76f3b29a6b1 to your computer and use it in GitHub Desktop.
Save fastred/776542c5d76f3b29a6b1 to your computer and use it in GitHub Desktop.
My response to https://twitter.com/ericasadun/status/490180083827503104, i.e. why the iPhone has a compact horizontal size class in a landscape orientation

And size class deals with, on a coarse level, the available space that your application has and can therefore make decisions about what its structure should be.

...

So, a size class is all about informing your application of the available space in some coarse way that you can make decisions about how you would substantially alter the application's structure.

—Bruce D. Nilo, Session 214, WWDC 2014

Based on the above citation I assume, that Apple decided there are different horizontal and vertical tresholds of sizes that influence the application's structure:

  • Vertical: 480 points (iPhone 4s's height in portrait orientation)
  • Horizontal: 768 points (iPad's width in portrait orientation)

There are also some important defaults, which leverage the fact that iPhone is always compact in a horizontal dimension:

  • UISplitViewController is by default collapsed in a horizontally compact container

  • UIPopoverPresentationController will use a full screen presentation in a horizontally compact container, from session 216:

    So if you show a Popover, a View Controller presentation will now automatically adapt that to a fullscreen presentation when you're in a horizontally compact size class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment