We help IT Professionals succeed at work.

Help me Understand Positioning of Elements

278 Views
Last Modified: 2019-04-02
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!
Comment
Watch Question

Developer, Administator and Railway Track Engineer (yep you read that right)
CERTIFIED EXPERT
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION