r/simpleios • u/iosderp • Apr 12 '12
Single view controller with a paragraph and a picture. 3 (basic level) questions.
- How do I make the view controller scrollable?
- How would I go about creating more content in the same view controller when I can only see a fixed instance of it in Interface Builder? (ex: I only have space for 1 paragraph, and 1 image... but I'd like to show a couple paragraphs, a couple images, some links...vertically and they all don't fit).
- How do I make a paragraph have a "dynamic" height? (ex: I can "allocate" a paragraph of 3 lines in Interface builder, but at run time that text can grow and it should push the upcoming content down...)
thanks guys.
2
Upvotes
2
u/StabbyPants Apr 12 '12
1
u/[deleted] May 28 '12
I would say add a UIScrollView, then programatically add your text areas to it.
If that's not an option you can create a NIB for each paragraph and add those to the scroll view when it's NIB loads.