Home > Software design >  How to make the View scrollable - View contain a stack with labels and image? [closed]
How to make the View scrollable - View contain a stack with labels and image? [closed]

Time:09-23

second image hereI have created a UIViewController with 4 UILabels and an UIImageView, embedded in a UIStackView. When I add a text into the second label, the length of the label increases and goes beyond the safe-areas. I tried putting a UIScrollView but it doesn't work.

Here is a screenshot of my Storyboard [updated image View added]

CodePudding user response:

As of now, according to your screenshot, your view hierarchy is like follows:

|-Scroll View
|---Content Layout Guide 
|---Frame Layout Guide.       
|-Stack View
|---Some content
.
.
.
|

You can drag your Stack View inside the Scroll View so that the hierarchy looks like the following

|-Scroll View
|---Stack View <---------------- Drag your stackview inside scroll view
|------Some content
|---Content Layout Guide 
|---Frame Layout Guide.       
.
.
.
|
  • Related