문제

I am using cocos 2d and I wanted to track multiple independent pan gestures. But I don't know how to do this neither by using onTouchBegin nor UIPanGesture class. If you could help me, I'd be grateful.

I've multiple sprites in the screen. I want the user to be able to drag them independently and concurrently.

도움이 되었습니까?

해결책

In the gesture delegates for both of your recognizers, implement the following protocol method:

-(BOOL)gestureRecognizer:(UIGestureRecognizer*)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer*)otherGestureRecognizer
{
    return YES;
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top