Skip to content

Conversation

@hasyimibhar
Copy link

When the scene is transitioning in, if the user touches on the screen, ccTouchesBegan is not called, but ccTouchesMoved is called. This causes a NSRangeException to be thrown, because _touches is empty. I added a simple workaround to ensure that ccTouchesMoved will never get called unless ccTouchesBegan is called first.

@psineur
Copy link
Contributor

psineur commented Apr 28, 2012

Why did you add an instance variable as a flag, instead of using simple check right in touchesMoved method?

Отправлено с iPhone

28.04.2012, в 12:17, fishcakereply@reply.github.com написал(а):

When the scene is transitioning in, if the user touches on the screen, ccTouchesBegan is not called, but ccTouchesMoved is called. This causes a NSRangeException to be thrown, because _touches is empty. I added a simple workaround to ensure that ccTouchesMoved will never get called unless ccTouchesBegan is called first.

You can merge this Pull Request by running:

git pull https://github.com/fishcake/cocos2d-iphone-extensions master

Or you can view, comment on it, or merge it online at:

#109

-- Commit Summary --

-- File Changes --

M Extensions/CCLayerPanZoom/CCLayerPanZoom.h (2)
M Extensions/CCLayerPanZoom/CCLayerPanZoom.m (17)

-- Patch Links --

https://github.com/cocos2d/cocos2d-iphone-extensions/pull/109.patch
https://github.com/cocos2d/cocos2d-iphone-extensions/pull/109.diff


Reply to this email directly or view it on GitHub:
#109

@hasyimibhar
Copy link
Author

Hmm, you mean check if _touches is empty? Whoops, I didn't think about that. :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants