Constraints Not Working For Some Reason


#1

My constraints are all fixed at 0px left and right, yet my previewer and also the device looks much different and I can’t for the life of me figure out why… :

Editor:

image

Constraints:

Hierarchy:


#2

I wanted to update this as I noticed that the differences change when the image at the top also changes in size.

With a scroll view, what image setting prevents the page from scaling left to right?

I am using Scale to Fill… Which is what is being used on other pages that are non-scroll view, but every scoll view seems to cause me these issues, and I’m suspecting it has something to do with a larger image that is being called.

I have tested in various other image settings but haven’t found one yet that prevents the page from scrolling right to left like this.

I have disabled horizontal and vertical scrolling but i believe those are just things that show up on the page telling the user they’ve scrolled either way.


#3

@justincrabbe these are painpoints for sure. Scrollviews determine their size by the implicit sizes of the elements within and when elements come in of variable sizing, this can create skewed results. I don’t have the best answer for you in this situation but if there’s variability in the image sizes that you’re displaying in a scrollview, this can become an issue despite imageviews aspect settings.

1 recommendation we have is to ensure all the elements inside the scrollview are constrained using pixels instead of percentages to ensure the best amount of information is available for the scrollview to build itself properly. This is also not a perfect system and you’re not the 1st to describe anomalies here.