简体   繁体   English

为不同的大小类设置不同的位置和约束

[英]set different position and constraints for different Size classes

I am little bit confused in size classes. 我对尺码课程有些困惑。 I have created a project in this I want the different position for wCompact hAny and wCompact hRegular . 我已经在其中创建了一个项目,我希望wCompact hAnywCompact hRegular位置不同。

I designed the UI using storyboard and set different position for these size classes. 我使用情节提要设计了UI,并为这些大小类设置了不同的位置。 Each Size classes have different constraints installed but when I run this It will not not given me desired output.I have attached some images please see this and give me answer where I am doing wrong or miss. 每个Size类都安装了不同的约束,但是当我运行它时,它不会给我想要的输出。我已经附上了一些图片,请查看此图片,并在我做错或错过的地方给我答案。

wCompact hAny的约束 这是wCompact的职位 wCompact hRegular的约束 wCompact hRegular的位置 在iphone4中输出 在iPhone 6+中输出

Set wCompact hAny and wCompact hRegular UIViewController.But before apply Constraints select size from Attributed Inspector because we are not familiar with the size of wCompact hAny and wCompact hRegular but after selecting size we get idea of iPhone Size. 设置wCompact hAny和wCompact hRegular UIViewController。但是在应用“约束”之前,请从属性检查器中选择大小,因为我们不熟悉wCompact hAny和wCompact hRegular的大小,但是在选择大小后,我们会了解iPhone的大小。

在此处输入图片说明

not apply centre Horizontal and vertical to the super view. 没有中央的水平和垂直应用到超级视图。 and also Set Height and Width according to requirement. 并根据需要设置高度和宽度。

在此处输入图片说明

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

相关问题 为不同的大小类设置不同的约束 - Set different constraints for Different Size classes 不同尺寸类别的不同约束 - Different Constraints for Different Size Classes 如何为不同大小的类别设置子视图高度限制 - How to set subview height constraints for different size classes 以编程方式创建用于不同尺寸类的具有不同常量的自动布局约束 - Programmatically create auto layout constraints with different constants for different size classes 如何为不同大小的类设置不同的约束 - how to set a different constraint for different size classes 针对不同设备方向以编程方式且没有尺寸类别的各种自动布局约束? - Various autolayout constraints for different device orientations programmatically and without size classes? 在不同大小的类别中设置约束,视图不会出现在横向中 - Setting constraints in different size classes, view does not appear in landscape 当所有按钮的大小不同时如何设置约束 - How to set constraints when all buttons are of different size 如何根据iPhone的尺寸在Splash中设置不同的约束? - How to set different constraints in a Splash depending on the iPhone size? 在Xcode Interface Builder中为不同大小的类设置不同的乘数值? - Set Different Multiplier Value for Different Size Classes in Xcode Interface Builder?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM