views:

124

answers:

2

Am using UIScrollview, when i am trying to capture touch event in UIscrollview is not responding. how should i achieve it? i am using UILable for showing the text.

Thanks

Sri

A: 

As of iOS 3.2 UIScrollView does not listen to touchesBegan:, touchesMoved:, touchesEnded:, etc. anymore, afaik.

You should add Gesture Recognizers instead to handle touch events in your UIScrollView. http://developer.apple.com/iphone/library/documentation/uikit/reference/UIGestureRecognizer_Class/Reference/Reference.html

But if you want to handle the touches in one of the UIScrollView's subviews, it would be best to read the Overview section in the UIScrollView documentation. See touchesShouldBegin:withEvent:inContentView:, pagingEnabled, and delaysContentTouches, among others. http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIScrollView_Class/Reference/UIScrollView.html

Altealice
I'm accessing them just fine, but with a small hack. See my answer above/below yours.
Kalle
A: 

"split" writes about a solution here that I used in my project to be able to access touches in a scroll view.

Kalle