0

I have a problem when trying to put buttons over an image.

Basically what I want this app to do is to take you to to a new View when you press the name of the cut in the cow diagram. The idea is to fit to every iPhone display, being only a horizontal app.

xCode

After applying some height and width constraints to "button1", the button did not appeared on the simulator.

Simulator screenshot

Which constraints should I use? There is another useful component for doing this in a better way?

  • Este es un sitio de habla inglesa. Intenta preguntar en https://es.stackoverflow.com/ – Dharman Jun 26 '20 at 17:53
  • This is tricky, but it can be done. See [this answer](https://stackoverflow.com/a/51372403/1630618) for a description of the approach. The main thing is to put your image into a view that has the aspect ratio of the image itself. This will allow you to place buttons in that view using multipliers that are ratios of the button's position and the image's width and height. – vacawama Jun 26 '20 at 18:24
  • That worked perfectly! Thanks, bro! – Erick Castañeda Martínez Jul 29 '20 at 19:23

0 Answers0