简体   繁体   中英

How to set vertical constraints in landscape orientation (Storyboard)

I am trying to set a vertical space constraint of 8 between the "x" button and the bottom of the screen. However it isn't working as expected.

As you can see from the screen setting the constraint of -200 positions the "x" right there, and setting it to 8 would result it to be much higher up.

I've attached a screenshot below. Why is the logic different from that of a portrait orientation? And how do I correctly add the constraint?

垂直约束

Aside from the constant (which you explain is your problem) the constraint looks correct. Make sure that you have constrained your item to the correct view. If there is another container view in your scene it may be constrained to that by mistake.

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