Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

UIScrollView, Custom UIView, and scrolling to top and bottom

Hi,

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?

Thanks,
Stephen

Message was edited by: rearcog

Mac Pro, Mac OS X (10.5.3), iPhone (2.0 beta 7)

Posted on Jun 24, 2008 4:17 PM

Reply
2 replies

UIScrollView, Custom UIView, and scrolling to top and bottom

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.