Search code examples
iphonepaginationuiscrollview

UIScrollView: single tap scrolls it to top


I have the UIScrollView with pagingEnabled set to YES, and programmatically scroll its content to bottom:

CGPoint contentOffset = scrollView.contentOffset;
contentOffset.y = scrollView.contentSize.height - scrollView.frame.size.height;
[scrollView setContentOffset:contentOffset animated:YES];

it scrolls successfully, but after that, on single tap its content scrolls up to offset that it has just before it scrolls down. That happens only when I programmaticaly scroll scrollView's content to bottom and then tap. When I scroll to any other offset and then tap, nothing is happened.

That's definitely not what I'd like to get. How that should be fixed?

Much thanks in advance!

Timur.


Solution

  • This seems to be a bug:

    UIScrollView doesn't remember the position

    I have tested this on iOS 4.2 (Simulator) and the issue remains.