Question posted in Xcode
Whether you're new to Xcode or an experienced developer, our archive has everything you need to know about this integrated development environment (IDE). From basic functionalities to advanced features, our archive covers a wide range of Xcode-related questions and answers. Browse our archive now and find solutions to your Xcode questions, and take your app development skills to the next level
Whether you're new to Xcode or an experienced developer, our archive has everything you need to know about this integrated development environment (IDE). From basic functionalities to advanced features, our archive covers a wide range of Xcode-related questions and answers. Browse our archive now and find solutions to your Xcode questions, and take your app development skills to the next level
2
Answers
In order to make scrollView Self sizing you have to set this constraints which pins it to borders of view and doesn’t sets certain height for it but instead it uses height of a content inside of scrollView.
You can also pin a stack view to the scroll view (or to the layout margins of the scroll view) which will allow the resizing according to the content:
Just make sure to provide the
intrinsicContentSize
for the arranged subviews or at least provide the height for each if you’re using.fill
,equalSpacing
, orequalCentering
for the distribution.