Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Brandon Mahoney
iOS Development with Swift Techdegree Graduate 30,149 PointsScrollView with dynamic content size
Can anyone explain to me how to make the content view of a scroll view size itself dynamically. I have labels which depending on what information is being loaded, they change sizes. How can I make it scroll to just past the bottom label. Currently I am just doing it manually by keeping the viewController in freeform. This does not look good though as the scrollView is not necessary for every selection from the tableView, only the ones with a large description label.

Brandon Mahoney
iOS Development with Swift Techdegree Graduate 30,149 PointsSure, its actually on Github.

Jhoan Arango
14,575 PointsOk, going to check it out.. where should I look into ?

Brandon Mahoney
iOS Development with Swift Techdegree Graduate 30,149 PointsThe only part that uses a scrollview so far is the HeroWODDetailView. As you can see it is just set up as normal with the storyboard where I just made the view larger.

Jhoan Arango
14,575 PointsFor some reason I can't seem to run the project.. send me your e-mail so that I can send you an invite to a slack group, and in there you can explain better what you want.

Brandon Mahoney
iOS Development with Swift Techdegree Graduate 30,149 PointsOk so I figured out I didn't have constraint between the lowest label and the bottom of the view. I still have a gap between the view and the scrollView at run time though however. I is corrected when I add a vertical constraint from the content view to the top of the container view but that causes the images constraints to go red now.
[https://www.dropbox.com/s/iggv5wi3gwpkibg/WOD%20Guide.zip?dl=0]
Jhoan Arango
14,575 PointsJhoan Arango
14,575 PointsHey Brandon:
I would have to see your code, and what you are doing in order to help a bit. Perhaps load it somewhere so I can take a look ?