9、为UIImageView添加单击事件:
p_w_picpathView.userInteractionEnabled = YES;
UITapGestureRecognizer *singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(yourHandlingCode:)];
[p_w_picpathView addGestureRecognizer:singleTap];
转载于:https://blog.51cto.com/yang120jun/1074298