iOS 动画中 点击事件

来源:互联网 发布:如何查看知乎提问者 编辑:程序博客网 时间:2024/04/30 14:38

- (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;}


0 0
原创粉丝点击