Avatar ·

UIScrollView scrollable content size ambiguity in Interface Builder: how to fix?

Hi everyone! I'm new to iOS development and have been struggling with UIScrollView for the second day now. I'm using Swift and Interface Builder (storyboards). My task is to create a screen with a form that doesn't fit on one screen (about 600pt in height). I added a UIScrollView to the ViewController, pinned its edges to the Safe Area (leading, trailing, top, bottom = 0). Inside the ScrollView, I placed a regular UIView (let's call it ContentView), and also pinned it to all four sides of the ScrollView (leading, trailing, top, bottom = 0). In the ContentView, I added several UITextField, UILabel, and UIButton, arranged them vertically using a vertical UIStackView, and set height constraints for some elements. When I run the app, scrolling doesn't work, and the input fields are cut off. In the Xcode console, a bunch of warnings appear.