![]() where should the superview place scrollview and what size. In order for scrollview to work in Auto Layout, scrollview must know its scrollable content (scrollview content) width and height, and also the frame (X, Y, Width, Height) of itself, ie. Scrollview works by having a scrollable content area, like this: Step 3: Placing UI Elements inside Content viewīefore moving on to how to use a scrollview in storyboard / XIB, I think it's crucial to discuss the structure of scroll view to prevent getting "ambiguous scrollable content width / height" error message in Interface Builder.Step 2 : Put a view inside the scroll view and set constraints.Step 1: Put a scroll view into the view controller and set constraints.Content Layout guide and Frame Layout guide.
0 Comments
Leave a Reply. |