让 View,ImageView整体有点击效果,和 Button一样
UITapGestureRecognizer *uitgp = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(ddd)];
[_tm1View addGestureRecognizer:uitgp];
uitgp.numberOfTapsRequired = 1;
_tm1View.userInteractionEnabled = YES;
[self.d1ImageView addSubview:_tm1View];
// 点击事件响应内容
-(void)ddd{
}
// 需要注意的一点是 必须是YES
_d1ImageView.userInteractionEnabled = YES;