3

With the new iPhone 6 Plus, in landscape the phone can show more content than the normal iPhone 6 or its predecessors. This makes sense, as in landscape the phone identifies as having a "regular width" for its size class.

However, in portrait its' still compact width, regular height for the size class, regardless of which iPhone. How is Apple then showing more on the iPhone 6 Plus in portrait when there's no size class identifying it?

Are they hard-coding it based on the device's width? Doesn't that go against the whole philosophy of size classes?

enter image description here

Doug Smith
  • 29,668
  • 57
  • 204
  • 388
  • 1
    In Autolayout, by monitoring constraints we can easily alter the logic so... if a certain constraint constant is more than a specific value then we can use the logic that shows more data or some other kind of data. I'm sure they're not hard coding it :| ...it's after all an app that someone has made. nothing special. – staticVoidMan Sep 10 '14 at 15:31
  • The same question ALSO applies to landscape-mode in Springboard! That too is a regular size class, but so is the iPad. But on the iPad the "pinned" apps (I don't know what to call them) are always on the bottom, whereas on the 6-Plus, they are on the right-hand side as shown in the demo. – Dev Kanchen Sep 15 '14 at 14:22
  • Apart from just using the pixel-width directly to determine the size of the UI, Apple could also be using any of the additional properties available in a UITraitCollection (which is where you would get your size-class). e.g. For my example (different Springboard on iPhone vs iPad) they could use the "idiom", whereas for the Messages app, they may use the "scale" (which is as good as using the pixel-width, but still). In other words, the size-class idea is not deep enough yet to allow you to design a proper UI on all device-sizes. The 6-Plus is HUGE. Compact just doesn't make sense there. – Dev Kanchen Sep 15 '14 at 14:28

1 Answers1

1

They are using auto layout to force their labels to adopt the width of the screen. There's a good description of how to achieve this in this SO answer.

Apple have also used Adaptive layout to implement the landscape view on Mail for the 6+.

Community
  • 1
  • 1
Rog
  • 17,070
  • 9
  • 50
  • 73