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 trialMelissa Be
87 PointsConverting UILabel to UITextview
I'm working in the Choose your own adventure lesson for iOS and I wanted to try to have the text box in the UI be scrollable.
To get that scroll, I changed UILabel to a UITextView since this seems like the natural way to get scrolling behavior, but now the text isn't showing up at all in the UI. I'm not sure what I'm missing here. Anyone have any ideas?
1 Answer
Chris Stromberg
Courses Plus Student 13,389 PointsUITextField has a property named "text". The easiest way to access this would be to create an outlet in your ViewController file linked to this UITextfield. Then within viewdidload set the UITextField.text = to what ever you want it show for text.
Melissa Be
87 PointsMelissa Be
87 PointsHmm so the text property is there, but I'm wondering if you know of anything specific to the UILabel or its sizing that would impact its conversion to the UITextView. It's still not working :(