Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
428 views
in Technique[技术] by (71.8m points)

ios - constrain view.bottom to superview.bottom not bottomLayoutGuide in storyboard

In interface builder it only gives me the option of constraining my sub view to the bottom layout guide, not the superview. Because I am sometimes using the controller as a child controller in a container controller setup, I really want to constraint to the superview bottom, not the bottom layout guide.

enter image description here

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

As @Trianna Brannon pointed out, the approach in the other answer no longer works in Xcode7. In Xcode7 you have to right click your element, draw a line to the bottom until the constraint selector pops up.

Constraint selector

Then press ALT and now you'll get the desired Bottom constraint:

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...