Search code examples
swiftxcodeuiscrollviewautolayoutuistackview

Storyboard Scrollview with StackView inside not scrolling


I know similar questions were asked before but all of them do it programatically and I'm trying to do this in the storyboard.

I have a scroll view with top, bottom, leading and trailing constraints, with a view inside it that is pinned to all edges of the scroll view and has equal width and height @250. Inside that I have a stack view with 6 other views that will change their height dynamically based on how much text each label gets. And it all works fine except for the fact that it doesn't scroll even when content overflows.

What am I doing wrong?

Here's a look at the storyboard:enter image description here


Solution

  • You need to remove the inner view height which = 250 , and pin the stackView to all it's edges

    enter image description here