简体   繁体   English

为什么iPhone 4、5、6的横向宽度和高度高度紧凑

[英]Why compact width and compact height in iPhone 4,5,6 in landscape orientation

I am new in iOS development and just studying Adaptivity and Layout I am stuck with a little confusion, 我是iOS开发的新手,只是学习适应性和布局,我有些困惑,

As per the Documentation 根据文档

iOS defines two size classes: iOS定义了两个大小类:

  1. Regular :- It is associated with expansive space 常规:- 与扩展空间相关
  2. Compact :- It is associated with constrained space 紧凑:- 它与空间受限有关

By other references : 通过其他参考:

  1. All iPhones (top left) in the portrait orientation have a regular height and a compact width like 所有以纵向放置的iPhone(左上角)都具有常规的高度和紧凑的宽度,例如 Iphone的肖像

  2. Iphone 4, 5 and 6 in landscape orientation have compact height and compact width. 横向放置的iPhone 4、5和6具有紧凑的高度和紧凑的宽度。 iphone在横向

  3. But in case of iPhone 6 Plus, It has compact height and a regular width in landscape orientation. 但是,对于iPhone 6 Plus,它的高度紧凑,横向固定宽度固定。

    iPhone 6毛绒风景

My Confusion is : 我的困惑是:

  • iPhone 4,5,6 have regular height and compact width in portrait mode but Why they don't have regular width and compact height in landscape orientation as it was reversed? iPhone 4,5,6在纵向模式下具有常规的高度和紧凑的宽度,但是为什么在翻转时它们在横向没有常规的宽度和紧凑的高度?
  • If so then why iPhone 6 plus is differ from them ? 如果是这样,那么为什么iPhone 6 plus与它们不同? Is it because it's screen is 0.8" bigger then iPhone 6 ? Does it matters ? 是因为它的屏幕比iPhone 6大0.8英寸?这有关系吗?

Thanks in advance!, Warm welcome to editors! 在此先感谢您!热烈欢迎编辑!

I know it won't affect in development so far technically But I just want to make my mind clear of these things. 我知道到目前为止,从技术上讲它不会影响开发,但是我只想让我头脑清楚这些事情。

If so then why iPhone 6 plus is differ from them ? 如果是这样,那么为什么iPhone 6 plus与它们不同? Is it because it's screen is 0.8" bigger then iPhone 6 ? Does it matters ? 是因为它的屏幕比iPhone 6大0.8英寸?这有关系吗?

It matters when you are using a split view controller . 当您使用拆分视图控制器时,这很重要。 When it has the same collapsed aspect on iPhone 5 and 6, it will split and show master and detail view controllers side by side in landscape orientation on iPhone 6+. 当iPhone 5和iPhone 6具有相同的折叠外观时,它将在iPhone 6+上以横向显示并排显示主视图和局部视图控制器。

尺寸等级图

It looks even more useless on iPad, since it has regular height and width size class on both portrait and landscape. 在iPad上,它看起来毫无用处,因为它在纵向横向上均具有常规的高度和宽度尺寸级别。

The point is, when you have regular size class, you should layout and show more content than on compact size class. 关键是,当您拥有常规尺寸等级时,应比紧凑尺寸等级布置和显示更多内容。

However size classes aren't related to the screen but to the view controller. 但是,大小类与屏幕无关,而与视图控制器有关。

When you have your iPad with a master and a detail view controller, the master view controller has compact width/regular height, and the detail view controller has regular width/regular height. 当您的iPad带有主视图和局部视图控制器时,主视图控制器具有紧凑的宽度/常规高度,而局部视图控制器具有常规的宽度/常规高度。

You can still change child view controller's size classes by overriding them with 您仍然可以通过覆盖子视图控制器的尺寸类别来更改它们

-(void)setOverrideTraitCollection:(UITraitCollection *)collection forChildViewController:(UIViewController *)childViewController

and

-(UITraitCollection *)overrideTraitCollectionForChildViewController:(UIViewController *)childViewController.

It's a key concept for iPad since you can now on iOS9 have your app running in compact width with the new multi-task feature (slide from the right of the screen) . 这是iPad的关键概念,因为您现在可以在iOS9上使用新的多任务功能(从屏幕右侧滑动)紧凑的宽度运行您的应用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 iPhone 6s Plus在横向上具有紧凑的水平尺寸等级 - iPhone 6s Plus has Compact horizontal size class in landscape orientation iPhone的人像高度-“常规”,上下颠倒-“紧凑”-为什么? - iPhone's Portrait height - 'Regular', Upside Down one - 'Compact' - why? iPhone 7 Plus的水平尺寸等级仍然紧凑吗? - Is horizontal size class still compact for iPhone 7 Plus on landscape? iPhone的初始肖像方向负载给横向视图元素宽度 - iphone initial portrait orientation load is giving element width of landscape view 尺寸类中紧凑宽度的“常规高度”和“任何高度”之间有什么区别? - What's the difference between “Regular Height” and “Any Height” in Compact Width in Size Classes? 今天在iOS 10中扩展紧凑模式高度 - Today Extension compact mode height in iOS 10 iPhone横向模式问题 - iPhone landscape orientation mode issues iPhone上的LandScape方向无法正常工作 - LandScape Orientation on iPhone Not Work Correctly iMessage扩展:获取紧凑视图的高度 - iMessage Extension: Get height of compact view 紧凑型(iPhone)设备上的UIPopoverPresentationControllerDelegate不会触发adaptivePresentationStyle - adaptivePresentationStyle not Triggering for UIPopoverPresentationControllerDelegate on Compact (iPhone) Devices
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM