Help me Understand Positioning of Elements

lateapex used Ask the Experts™
I need some help understanding swift/xcode positioning of elements. I've done several tutorials and built some apps but I really don't get it. I know my way around the xcode IDE, for instance the pin tool for creating constraints.

If I have 3 buttons on the left side of a view, one 15% from the top, one in the middle, and one 15% from the bottom. For the sake of discussion, I'll use my top edge on the top one and bottom edge on the bottom button.

How do I maintain this across different phone sizes? In this case portrait only. I can pin the top and bottom and then pin the center button to it's upper and lower neighbors but that fixes them in place. And they would be different percentages of distance apart on different size phones.

What am I missing?

Thank you!
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
IT, System Admin, Development and Stack Development
Usually if you lay it out visually and set the constraints as per UI Builder then it'll be fine.

You would set this mainly by priorities... e.g. click on the constraint (or highlight it in the Document Outline)...

From there, set the constraint priority,. The lower the priority, the more likely it is to give way to other constraints with high prio's...

The higher the priority, the more likely it is to override or overload another constraint with a priority lower.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial