Cocos2d 2.0 Adding UIView to CClayer openglview deprecated

Rafael Jimeno picture Rafael Jimeno · Jun 12, 2012 · Viewed 8.7k times · Source

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?

Answer

SimplyKiwi picture SimplyKiwi · Jun 12, 2012

Use this instead of openGLView:

[[CCDirector sharedDirector] view];