Cocos2D, UIScrollView, and initial placement of a scene
Posted
by diatrevolo
on Stack Overflow
See other posts from Stack Overflow
or by diatrevolo
Published on 2010-05-12T16:28:24Z
Indexed on
2010/05/13
15:24 UTC
Read the original article
Hit count: 425
Hello:
I am using a UIScrollView to forward touches to Cocos2D as outlined in http://getsetgames.com/2009/08/21/cocos2d-and-uiscrollview/
Everything works great after a few days of working with it, except one thing: when the initial view appears on the screen, the background appears to be scrolled to the center. As soon as I try to scroll around, the image jumps to 0,0, and everything works as normal, except the touches are offset by half the width and height of the background image. Am I overlooking something basic? I can't think of a useful portion of the code that illustrates the issue, as I can't track it down, but would be happy to post code if anyone has any ideas.
Thanks in advance,
-Roberto
© Stack Overflow or respective owner