Iphone – How to Cancel Scrolling in UIScrollView


I use UIScrollView to make large-sized (larger than 320px) UI on iPhone.

I made an instance of UIScrollView and added some subviews on it.
The problem is that I want to enable scrolling only when user touches outside of subviews,
stop scrolling when user touches one of subviews.

I read documents and tried to find samples but I can't find good hint.
If you have any idea, please help me.

Best Solution

UIScrollView has a scrollEnabled property that allows you to disable scrolling programatically. It also has a delegate (UIScrollViewDelegate) that allows you to see events such as scrolling starting/ending. Seems that you should be able to cook something up with those options combined in some way.