I have a custom UIView that I am scrolling with UIView. I scroll through my UIView by tiling the content. The problem I have is that the content the user is scrolling through is way too big to pre-calculate the pixel size of the view (ie google maps). I handle this by setting the UIScrollView's content offset to (0,500000) and the content size to (320,1000000). The problem I am running into is when the user scrolls to the top and bottom of the content. I can detect when this happens in my delegate with the (void)scrollViewDidScroll:(UIScrollView *)scrollView method. I tried changing my custom view's frame to be at the top or bottom and change the UIScrollView's content offset (setContentOffset) to be at the top and bottom. This does not make the UIScrollView stop scrolling. It actually goes back to its previous contentOffset. It appears that the contentOffset is calculated each time you ask for it based on touch events.
Does anyone know if it is possible to make a UIScrollView stop scrolling and bounce even when it thinks it is in the middle of its content? Or does anyone know a better way to handle this?
I am moving my UIView in the scrollViewDidScroll: method. The problem is that since I can't pre calculate the size of my UIView I need a way to tell the UIScrollView to stop scrolling when it hits the top and bottom of my UIView.