I have used UIScrollView
before, and am using it now, and never had a problem. I\'m now adding it to an old app, and while it works as expected (I can look at
I had the same symptoms as this issue..the scrollRectToVisible was not working as intended. My problem was that the scrollview on the storyboard had a ambiguous constraint problem. Once that was fixed the call worked just fine. It is something else to check when the scrollRectToVisible call isn't working as intended.
i had it like this and it didn't work
scrollView.contentSize = CGSizeMake(scrollView.contentSize.width, someKnownValue);
i was just changing the height of the contentSize
, so I didn't think that would give me any problem but it did ...
had to change it to this
scrollView.contentSize = CGSizeMake(someOtherKnownValue, someKnownValue);
turns out scrollView.contentSize.width
is not necessarily set to a valid value from the get go, so better give it an specific value