1
votes

I have a UIScrollView with 5 labels. If the user scrolls it up such that currently only 3rd, 4th and 5th labels are visible and then presses a button which takes him to a new view. When he presses the back button, the UIScrollView resets such that the 3rd label becomes the 1st label, 4th becomes 2nd and 5th becomes 3rd.

The top 2 disappear. I cannot scroll up to see the first 2 labels no matter what.

1
you need to provide your code snippets - Tala
@Tala I've done it all via Storyboard. The UIScrollView occupies all the available space. The labels are defined with their leading and top space dependent on the Superview. - Bilbo Baggins
so you have 5 labels added to scrollview in storyboard? check the constraints too. - Tala
@Tala the constraints are all based wrt to the Superview. - Bilbo Baggins

1 Answers

1
votes

I found the solution to this problem on this question - UIScrollview Autolayout Issue

I'm keeping this question so that if somebody googles for 'UIScrollView gets stuck' he'll find the answer. The other question was hard to find.