简体   繁体   中英

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 .

I designed the UI using storyboard and set different position for these size classes. 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.

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.

在此处输入图片说明

not apply centre Horizontal and vertical to the super view. and also Set Height and Width according to requirement.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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