Here I have a ViewController and I need to put an ImageView in the center of the screen.

I mean, I grab this view and put it in the middle so that the lines appear vertically and horizontally.

But when I switch between the screens of different devices, this center shifts ...

If you pull Trailling it simply fixes the distance to the edges and thus stretches my View on the big screen ...

I tried to find it in Google, but it seems that only I have such a problem

How to put the View in the center so that it is in the center on all screens

    1 answer 1

    Pictures here are easier to explain:

    enter image description here

    enter image description here

    Well, set the required height / width of the image.

    • I added vertical and horizontal dependencies, but all the same, on one device it looks normal, when I switch to another screen, it still does ... - Aleksey Timoshchenko