4

I am creating an app that have a dashboard with 11 images..

1 is the background, 1 are the lines that divide the button and 9 are the button with images.

I tried several times with the automatic constraints assignment but I also tried manually and I can't figure it out how to setup the constraints correctly. I followed also a lot of tutorial. If you watch the image below, you can see that the button/images especially in the iPhone 4 are weird!

enter image description here

peterh
  • 11,875
  • 18
  • 85
  • 108
MarcoCarnevali
  • 671
  • 8
  • 23

2 Answers2

8

you have to take a view which contains a button....after that just follow the below image for set up view constraints...You have 9 images ...I just gave you demo with 7 buttons

enter image description here

and for button there is just 4 constraints...I setup for one...you just need to follow for all buttons...

enter image description here

And here is the result image...

enter image description here

Bhavin Bhadani
  • 22,224
  • 10
  • 78
  • 108
0

Add all of the components into UIView and than set the constraints for UIView. These will help a lot to setup view.

Bhadresh Mulsaniya
  • 2,610
  • 1
  • 12
  • 25