I have work on touch event but that would be not work because of I take imageView in ScrollView so,that when I touch the image that directly work scrollview but not work touch on image so give any suggestion and source code which is apply in my code.....
Asked
Active
Viewed 197 times
1 Answers
1
As frauen1 says in their answer here:
1) In the UIScrollView class, set the value of canCancelContentTouches to NO - this tells the UIScrollView class to allow touches within subviews (or, in this case, in subviews of subviews).
2) In my "card" class, set exclusiveTouch to YES - this tells the subview it owns the touches inside of it.
Now it will allow double tap on ImageView with following code
UITapGestureRecognizer *tapRecognizer;
self.imgViewGVC.userInteractionEnabled = YES;
tapRecognizer = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(handleTapView:)];
tapRecognizer.numberOfTapsRequired = 2;
[self.ImageView addGestureRecognizer:tapRecognizer];
[tapRecognizer release];

Community
- 1
- 1

Paresh Navadiya
- 38,095
- 11
- 81
- 132