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! While you're at it, check out some resources Treehouse students have shared here.

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

iOS

scrollview help! not aligning properly iOS

I'm having a problem w/ using scroll view. In my storyboard, I put in the UITextFields within the scroll view container. I am also using TPKeyboardAvoidingScrollView I downloaded from GitHub.

When I run my simulator, the container does not line up properly and cuts off the bottom. I made sure my scroll view container was aligned and constraints were set to 0 on all 4 sides.

screenshot: http://imageshack.com/a/img845/6308/xccv.png (left is storyboard, right is simulator)

It looks like every time it's run, the scroll view is aligning to the top. Can anyone provide some tips on fixing this issue so it always aligns to the bottom of the scroll view when loaded?

thanks!

1 Answer

Make sure the scroll view constraints are pin to it's container view, not to the topLayout !

Hope that help.