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 troubles

Hey all

So what i am doing in my current view controller is adding two textviews and a button. My initial problem was that when rotating the screen, the textviews would not stretch the way i wanted, basically it was a pain with Autolayout. My second issue was also when in landscape, the keyboard was covering the second textview. So after a bit of research i realized i needed to add a scrollview which i did. I also added another view within the scrollview to add my textviews and button. I read that doing this would make dealing with constraints easier. So after doing this my first problem was solved and my textviews were exactly where i wanted in landscape, but i ran into a few new problems that i am stuck on.

  1. My navigation bar is totally gone, it does not show up at all in the VC.
  2. I was using the touchesBegan method to dismiss the keyboard, which is no longer working as well.

This is my first time dealing with Scroll views so any help would be appreciated to fix these problems. Thank you!