Tap gesture is not working in imageView but it working another view

后端 未结 1 428
忘掉有多难
忘掉有多难 2021-01-24 05:22

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 MPMoviePlayerC

1条回答
  •  离开以前
    2021-01-24 05:51

    videoimg=[[UIImageView alloc]init];
    videoimg.image=[UIImage imageNamed:@"fb.png"];
    videoimg.userInteractionEnabled=YES;
    
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(imagePan:)];
    [videoimg setGestureRecognizers:[NSArray arrayWithObject:tap]];
    tap.numberOfTapsRequired=1;
    [self.videoPlayerView.view addSubview:videoimg];
    

    use it may help you....

    0 讨论(0)
提交回复
热议问题