Sunday, April 3, 2011

How can back to scene from view?

Ques: I had added the view using the code:

[[[Director sharedDirector] openGLView] addSubview:myView];

But how can I will back to Game scene?

if you are asking how to attach UIKit views and such to a cocos2d-iphone project, you just have to do it like:

[[[Director sharedDirector] window] addSubview:myView];

Updated to cocos 0.7 and now this is:

[[[Director sharedDirector] openGLView] addSubview:myView];

From stackoverflow
  • How about just removing your view?

    [myView removeFromSuperview];
    

0 comments:

Post a Comment