I am having trouble getting the text in the label to appear in at the top and for some reason my UIScrollView will not go all the way to last point (i.e. 10). It stops at 7. I have added some images to explain what I mean.
Asked
Active
Viewed 46 times
2 Answers
1
This should not be a label. It should be a non-editable text view (UITextView). Then the problem would not arise.
In effect, a non-editable text view is a scrollable label!

matt
- 515,959
- 87
- 875
- 1,141
-
thank you. Follow-up question - if I wanted to make a combination of images and text (like a sentence here or there) I would have to use UIScrollView, right? Sometimes there autolayout issues, so would it be better to: 1) create a ViewController then on top of that UIScrollView and then View and then put my labels and images on the view OR 2) create a ViewController then on top of that UIScrollView and then put my labels and images on the UIScrollView (i.e. no View added in this one) – Babz Nov 22 '16 at 21:30
-
0
Change your bottom layout constraint relation of UILabel to bottom margin as Greater than Equal then your problem will be solve, even no need to apply textview.
Change the content hugging priority vertical to 751 then it will maintain its position in the scrollview and will increase the scrollview's contentSize.height dynamically.

Subhajit Halder
- 1,427
- 13
- 21