iOS 8 size classes for iPad landscape [duplicate]

被刻印的时光 ゝ 提交于 2020-01-11 17:12:50

问题


It seems all the current iOS devices maps to the new iOS 8 size classes nicely except iPad landscape? I seem not able to figure out how to use the size class feature to draw a different scene for iPad landscape (different from iPad portrait)?

Is that intended by design in Apple's mind or am I miss something about the iOS size classes?


回答1:


It appears to be Apple's intent to treat both iPad orientations as the same -- but as a number of us are finding, there are very legitimate design reasons to want to vary the UI layout for iPad Portrait vs. iPad Landscape.

However, I believe I have an answer for adapting size classes to do just what you need.

Please see: https://stackoverflow.com/a/28268200/4517929




回答2:


It seems to be by design (which I think we can all agree is lame). You'll probably have to resort to doing things in code for iPad landscape layout by checking something like

UIApplication.sharedApplication().statusBarOrientation.isLandscape


来源:https://stackoverflow.com/questions/24601468/ios-8-size-classes-for-ipad-landscape

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