Pergunta

I have read lot of documents and tutorials about autolayout and constraints but I don't know what I'm doing wrong but in my case the examples doesn't work...I know that this is a repeated question but I don't know what I can do...

I'm trying to fix a button to my bottom screen. Bottom with 0 distance. In 4 hinches screen all is ok but when I'm changig to 3,5" the button dissapear. This is what I'm doing:

Selecting button enter image description here enter image description here enter image description here

  1. Normal button
  2. Select button and add the bottom space constraint
  3. Button look likes fine
  4. When screen size changes, the button dissapears

Thanks a lot!

Foi útil?

Solução

You can complete the following steps to achieve that:

  1. Add bottom constraint, width and height: enter image description here

  2. Add horizontal centre constraint: enter image description here

  3. Now you can test on your storyboard by clicking the Apply from factor button: form factor button enter image description here

Outras dicas

Select the button, and select "Update Frames"

enter image description here


Suggestion: you should add constraints to the button for left, right and height.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top