iOS 动画中 点击事件

- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch{
    if (touch.view.tag == 9000) {
        if ([[touch.view subviews] count]) {
            
            CGPoint touchPoint = [touch locationInView:touch.view];
            
            for (DYBroadcastDmItemView *colorDanmu in touch.view.subviews) {
                if ([colorDanmu isKindOfClass:[DYBroadcastDmItemView class]] && [colorDanmu.layer.presentationLayer hitTest:touchPoint]) {
                    return YES;
                }
                
                
            }
        }
        return NO;
    }

    return YES;
}


你可能感兴趣的:(iOS 动画中 点击事件)