0
votes

I would display a view in my iOS app, but when I try to use ScrollView, even if I put stack views, it doesn't work.

Here is a screenshot of my storyboard:

storyboard

I do tests with a long description I put in my code, but the scroll view doesn't work properly. Here are the constraints of my View Controller:

contraints

Where the problem could come from?


EDIT:

After deleting the View.centerY = centerY, I get this error:

Scroll View: Need constraints for: Y position or height

Here is my new constraints:

new

1
Try removing the constraint View.centerY = centerY. and set the bottom constraint of the collection view to the scroll view's bottom. This could be due to the height of the screen and you are also setting the y constraint in the same case. - Bharath
Thanks, I deleted the constraint but I don't know how to fix the new error. I don't know which contraint to add to fix the "Need constraint for: Y position or height". I edited my first post with screenshot and more details. - cusmar
I hope your problem is solved already. - Bharath

1 Answers

0
votes

Constraint View.centerY = centerY between the content view and the scrollView will prevent scrolling. Drop that constraint.