The reason is that the limits inside the scroll attached to the scroll view do not mean that you think about them. They are related to the definition of contentSize from inside view; they themselves do not determine the size of things inside the scroll from the outside. See my answer here: fooobar.com/questions/75507 / ...
The simplest solution in your case is to use an intermediate representation of the content, so you have this hierarchy:
scroll view content view label
Now give the absolute restrictions on the width and height of the content view and snap them on all four sides to the scroll view. Now the shortcut will work as you expect. The presentation of the content has sufficient limitations both to set its own size and to limit the viewing of contentSize scrolling from the inside. Meanwhile, label restrictions do not apply to the scroll view, but to the content view, and since the content view is fixed in size and is a regular view (and not scroll), the label constraints do what you expect.
source share