简体   繁体   English

尺寸等级和加号电话

[英]Size Classes & Plus Phone

So all phones have compact width/regular height in portrait. 因此,所有手机在纵向上都具有紧凑的宽度/常规高度。 Plus phones have regular width/compact height in landscape while others have compact width/compact height. Plus手机在横向上具有常规的宽度/紧凑高度,而其他手机在宽度/紧凑高度上则紧凑。

So the only in LANDSCAPE orientation you can distinguish a plus model phone. 因此,只有在LANDSCAPE方向上,您才能区分plus型手机。


Question

Is there a way to distinguish a plus model phone in portrait orientation? 有没有办法区分纵向的plus型号手机?

without checking for: 无需检查:

  • Screen resolution 屏幕分辨率
  • Screen scale 屏幕比例
  • Device strings 设备字符串

在此处输入图片说明


NOTE: 注意:

Checking for screen resolution/scale, device strings are plausible, however trying to stay away from those. 检查屏幕分辨率/比例,设备字符串是合理的,但是请尽量远离这些字符串。 For example, Apple had to put Contact Icons for Favorites for iPhone Plus in Portrait. 例如,Apple必须将iPhone Plus的“收藏夹中的联系人图标”设置为“纵向”。 So there has to be a formal way to do this? 因此,必须有一种正式的方法来做到这一点?

You are getting it wrong. 你错了。 The main purpose to make the adaptive layout is it can adapt to any screen size irrespective of device. 进行自适应布局的主要目的是它可以适应任何屏幕尺寸,而与设备无关。

You should not think about these devices screen size while making layouts. 进行布局时,您不应该考虑这些设备的屏幕尺寸。 You should be thinking of size classes. 您应该考虑尺寸等级。

If your layout can work in above size classes than it should work in respective phones. 如果您的布局可以在上述尺寸级别上使用,则它应该在相应的手机中可以使用。 Also if you are looking for orientation but your app support the multitasking than your layout might not work with that. 另外,如果您正在寻找方向,但是您的应用程序支持多任务处理,那么布局可能无法正常运行。

Ideally, Your app should have layout that can work in any screen size because apple is releasing new devices with different screen sizes so your app should be compatible and work in every layout. 理想情况下,您的应用应该具有可以在任何屏幕尺寸上使用的布局,因为苹果公司正在发布具有不同屏幕尺寸的新设备,因此您的应用应该兼容并可以在每种布局上使用。

But that is ideal world. 但这是理想的世界。 You can handle most of your layout with size classes. 您可以使用尺寸类别处理大部分布局。 In some cases you need to handle the special scenarios. 在某些情况下,您需要处理特殊情况。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM