i have working in image and video overlay in that i put one image view, i assigned the tapGestureRecognizer to that image view its not working,For video i put one MPMoviePlayerController and i set the tapGestureRecognizer to it this one working fine but the image view only not working.Below is my code
- (void)viewDidLoad {
[super viewDidLoad];
videoimg=[[UIImageView alloc]init];//OvelayImage
videoimg.image=[UIImage imageNamed:@"fb.png"];
videoimg.userInteractionEnabled=YES;
videoimg.multipleTouchEnabled=YES;
[self.imgView bringSubviewToFront:videoimg];
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(imagePan:)];
tap.numberOfTapsRequired=1;
tap.numberOfTouchesRequired=1;
[videoimg addGestureRecognizer:tap];
[self.imgView addSubview:videoimg];//add the overlay image to Main imageView
[self.videoPlayerView.view addSubview:videoimg];//MPMoviePlayerController-add the overlay image to VideoView
}
//Gesture
-(void)imagePan:(UITapGestureRecognizer*)ges{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Image" message:@"FB Image Clicked..."
delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
}