I'm trying to make a simple card toy. I can not understand with. I need the map to have + - the same size and placement on the screen, regardless of the device on which it is running.

I don’t understand exactly how you need to set up the constraints that would work out as I needed and placed + - also on all possible screen resolutions.

On a unit, you can do the same with one left foot, and here - some kind of horror.

Of course, I can do what I want just programmatically. But, this, in fact, is not the right way out.

enter image description here

  • do you want the height of the view to always be the same percentage of the height of the parent, or some specified view? - Max Mikheyenko
  • parent. In this case, the parent is ViewController - Andrew

1 answer 1

I do from memory, I can forget something, but something like this happens:

Choose two twists that you need and set them equal height (or equal width according to the situation)

enter image description here

Then find the newly created project and set the multiplier in it. That is, make them equal in view of the multiplier. Not the most obvious approach, but what to do.

enter image description here

  • very similar to the fact that this is exactly what I was looking for. Now I will recheck and mark the correct answer. Thank you very much. - Andrew