How is Apple showing more in the Messages app in portrait on the iPhone 6 Plus?

回眸只為那壹抹淺笑 提交于 2019-12-05 02:07:48

问题


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?


回答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+.



来源:https://stackoverflow.com/questions/25769312/how-is-apple-showing-more-in-the-messages-app-in-portrait-on-the-iphone-6-plus

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!