srikanth rongali
srikanth rongali

Reputation: 1453

In cocos2D how to write a selector for a sprite

I got problem in cocos2D application. I have a sprite and text in one screen. The text should be able to move up/down when we swipe. And when we select on the sprite it should take to next scene. So, both should have the istouchEnabled to YES. But text should take the touchesMoved and sprite should take touchesEnded. But my problem is either one is working. If am able to swipe the text, I am not able to select the sprite.( touchesEnded for sprite is not called).

Please guide me, I am stuck here.

Upvotes: 0

Views: 791

Answers (1)

Rob Segal
Rob Segal

Reputation: 7625

Sounds like you might be trying to mix the functionality of UIScrollView and the graphical capabilities of Cocos2D. Me and my team ran into this issue a few months ago. We wrote an article about it...

http://getsetgames.com/2009/08/21/cocos2d-and-uiscrollview/

Hopefully that helps you out.

Upvotes: 1

Related Questions