I’ve a UIScrollView with a subview UIView, here UIView also has subview of type UIImageView.
The hierarchy something like ViewController -> UIScrollView -> UIView -> UIImageView.
All, UIScrollView, UIView, UIImageView added dynamically, all enabled userInteractionEnabled=YES, at once SIX views visible on UIScrollView as user scrolls the next SIX UIViews will be visible.
I am implementing UITouch events to detect any touch on my UIImageView
-(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
//I want to detect particular UIImageView
}
-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
//Here, user can move any UIImageView
}
But, I can’t detect touch on it. I try for some other ways said here. Also tried some of my mind suggested me, but I found & realize that any subviews under UIScrollView couldn’t detect any object.
I also tried for one more thing that, I added a UIView as subview in self.view, any its interesting to know that, its detects touch!!
Is anyone with this kind of issue, having any solution? Any help would be appreciated.
U can do one things,
Same Problem I have already face,So
In UIscrollview Add Caustom UIButton and set image and define tag all the button into the UIButton.
this way work very smoothly.
}