I have added UITapGesture on UIImageView. Have added all the code. ImageView description is showing the gestures, but still it is not working.
@interface VideoBaseProgramEditorViewController ()<UIGestureRecognizerDelegate> {
UITapGestureRecognizer* tapGesture;
}
...
tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(viewTapped)];
[tapGesture setNumberOfTapsRequired:1];
tapGesture.delegate = self;
thumbImageView.userInteractionEnabled = YES;
[thumbImageView addGestureRecognizer:tapGesture];
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch {
UIView *view = touch.view;
NSLog(@"%@",view);
return YES;
}
-(void) viewTapped {
[self loadVideo];
}
Issue: shouldReceiveTouch method is also not calling.
Image view description is showing added gesture in logs.
UIImageView: 0x7bb7b370; frame = (0 0; 736 485); opaque = NO; autoresize = W+H; gestureRecognizers = NSArray: 0x7bc80910; layer = CALayer: 0x78f793d0
any help appreciated.