Stop uiscrollview scrolling

Hi.
Is there a way to stop the scrolling in a uiscrollview ?
I want to stop the scrollview when the user touches/drags a zoomslider. If I don't and the user drag the scrollview and then start zooming it jumps around like crazy.

Do you need the user to be able to zoom, or interact with the scrollview?

If not, you can set userInteractionEnabled to NO.

Yes, I need the user to be able to zoom & drag the scrollview, but as soon as he touches the slider I want the moving/zooming to stop and to set the zoomvalue from the slider by calling setZoomScale:slider.value.
I tried to set the scrollEnabled to NO when the user touches the slider and back to YES when the user release the slider, but the scrollEnabled doesn't seem to have any impact before the scrollview has stopped moving.

with your slider's tag is 999
with this the scroll view will not process your touch but release it to your slider
Good luck!

The slider is not in the scrollview so thats not the problem. I just want to send a call to the slideview so it stop scrolling instantly.
I tried to set userInteractionEnabled=NO when the user touches the slider, but that doesn't stop the scrolling.
Sorry for my bad explaining .

I had a similar situation where I needed to tell a UIScrollView to stop scrolling and had a crazy idea that seems to work. In my testing so far, the behavior seems identical to what happens when a user touches a view that is scrolling - it stops immediately. It also seems to handle bounces the same way - the view stops scrolling and immediately goes to the edge of the content.

Try the following code. If you wanted to, you could also extend the UIScrollView class and include this as a function:

//Stop the scrolling in a UIScrollView by telling the view to scroll to its current offset position
//(or to scroll to the edge of the view if the current offset position is outside of the content
//area due to a "bounce")

I had a similar situation where I needed to tell a UIScrollView to stop scrolling and had a crazy idea that seems to work. In my testing so far, the behavior seems identical to what happens when a user touches a view that is scrolling - it stops immediately. It also seems to handle bounces the same way - the view stops scrolling and immediately goes to the edge of the content.

Try the following code. If you wanted to, you could also extend the UIScrollView class and include this as a function:

//Stop the scrolling in a UIScrollView by telling the view to scroll to its current offset position
//(or to scroll to the edge of the view if the current offset position is outside of the content
//area due to a "bounce")