में मैं Cocos2d नवीनतम संस्करण यहाँ के लिए काम करने के लिए स्वाइप पाने के लिए कोशिश कर रहा हूँ मेरी कोड है!स्वाइप Coco2d
अद्यतन 1:
मैं निम्नलिखित और अभी भी कोई स्वाइप का पता चलता है करने के लिए कोड अद्यतन किया गया।
-(void) setupGestureRecognizers
{
UISwipeGestureRecognizer *swipeLeft = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeLeft)];
[swipeLeft setDirection:UISwipeGestureRecognizerDirectionLeft];
[swipeLeft setNumberOfTouchesRequired:1];
[[[[CCDirector sharedDirector] openGLView] window] setUserInteractionEnabled:YES];
[[[CCDirector sharedDirector] openGLView] setUserInteractionEnabled:YES];
[[[CCDirector sharedDirector] openGLView] addGestureRecognizer:swipeLeft];
}
मैं UIGestureRecognizer का उपयोग करना पसंद करता हूं क्योंकि विभिन्न प्रकार के स्पर्श ईवेंट बनाना आसान है। – azamsharp
यह प्रतिभाशाली है! –