1

I want to set the view on iPhone(portrait) and iPad(landscape) such that: 1. on iPhone view must take full width of screen (In portrait). Please check following screen shot.

enter image description here

  1. on iPad the same view must be of size 500px width (in landscape)

enter image description here

How should I do it in one view only?

4

2 回答 2

2

我认为你应该观看这个视频教程,它演示了如何使用大小类。 https://developer.apple.com/videos/play/wwdc2016/222/

于 2017-01-23T10:07:57.527 回答
1

我可以使用“Vary for Traits”选项来实现这一点,请查看下图:

在此处输入图像描述

使用此选项,我可以设置特定于 iPhone 或 iPad 的约束。

于 2017-01-23T13:02:57.817 回答