1.签订<UIGestureRecognizerDelegate>代理
2.实现代理方法(加单击手势的视图上方有子视图noResponseView,但noResponseView不响应单击手势)
-(BOOL) gestureRecognizer:(UIGestureRecognizer*)gestureRecognizer shouldReceiveTouch:(UITouch*)touch
{
if ([touch.view isDescendantOfView:noResponseView]])
{
return NO;
}
else
{
return YES;
}
}