UIImageView *imageView = [self getYourImageView]; imageView.image = [self getYourImage]; imageView.userInteractionEnabled = YES; UITapGestureRecognizer *singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(yourHandlingCode:)]; [imageView addGestureRecognizer:singleTap]; //2,获得事件源 -(void)yourHandlingCode:(UIGestureRecognizer *)gestureRecognizer { UIImageView *view = [gestureRecognizer view]; int tagvalue = view.tag; }