Add the Vertical Center in Container constraint (Alignment constraint button on the interface builder) to the buttons and change the constant to -10 to -15 as appropriate. You will probably need a x constraint, height constraint, and a width constraint as well.
Xcode UIBuilder - placing a button X pixels above the vertical center
Pergunta
I have several buttons and i want the lower one to placed in center Y plus 10-15 pixels. I am trying to do this with the auto layout constraints, but i can't figure out what should be the correct constraint.
Solução
Outras dicas
I don't think it's possible to place an item "N points above the center." Instead, you can create a plain UIView with a transparent background and center that in your window. Give it a height of 10 points or so. Then you can use auto layout to place your buttons ~5-10 points above that.
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow