简体   繁体   中英

Left constraints in Xcode 7

So I'm doing a tut on iOS 9 development with Xcode 7, and in the example I'm currently doing the instruction is adding constraints using ctrl+drag and clicking on a second image. Now my issues isn't with that process, my issue is when the video asks me to set left constraints (the right image attached) I don't have that option (the left side of the image attached). I tried "leading" just to see what it would do and it did not achieve desired results. I'm guessing that this is changed in Xcode 7 and there is a new method of achieving this result?

Any help is appreciated, thanks!

EDIT: To update my question as per a suggestion below, here's what's happening. I have a background image view. When I am lining up image buttons along the background image, the first one is just fine, once I select the second one, and add the leading constraint, then lock in the width and height in the main constraints - it flies off the page somewhere. The background image is horizontally and vertically aligned to the container, and the main reason I'm doing this is I have "landscape mode" pulled up in a main preview window and I want to make sure that everything is looking good in that mode.

I have tried starting a new project all together and I get the same result. Again the tutorial I'm following was using Xcode 7 beta, so not sure if that has something to do with it. I'd like to lock in on the problem instead of skipping over it in case I run into this in the future.

Thanks!

Xcode 7问题

Try using the main constraints menu at the button of Xcode.

See below screenshot: click the element you want to add a constraints to and it will give you the options you need.

菜单1

菜单2

Cheers, Tal

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