Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cocos2d 2.0 Adding UIView to CClayer openglview deprecated

I'm having some troubles adding an UIView to cocos2d v2.0 since the openGlView is deprecated I can't add the view to it. I was looking around to find another way to do this but I couldn't find anything.

Can anyone tell me the new way to add an UIView in front of all cc layers?? or how can I accomplish this?

like image 623
Rafael Jimeno Avatar asked Jun 12 '12 18:06

Rafael Jimeno


2 Answers

Use this instead of openGLView:

[[CCDirector sharedDirector] view];
like image 181
SimplyKiwi Avatar answered Nov 19 '22 23:11

SimplyKiwi


This worked for me!

[[[CCDirector sharedDirector] view] addSubview:myUiView];

Considering that openGLView is deprecated!

like image 3
Sagar Avatar answered Nov 19 '22 22:11

Sagar