u/vojnikMonin r/swift • Recommends
On “Having trouble understanding Auto Layout and constraints”
Watch this video, it has very good explanation of how autolayout works
In your case the reason the view grows / shrinks is because you anchor it to the edges of your superview ( the view controller i am guessing) and that superview changes sizes on devices, if you want a constand dimension use width and height anchor and make it equal to a constant. After that you need to position it by using centerx or centery anchors or by the edges using top, bottom, leading, trailing anchors.
link to this video