Does anyone know how can I add a uiviewcontroller (or just the view) onto a cocos2d layer?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is how it’s done:
The UIKit view will be drawn in front of the cocos2d scene. If you need it behind you need to change a couple things (32-Bit framebuffer, cocos2d view opaque = NO, glClearColor with full alpha).
You can’t have a UIKit view that’s on a specific cocos2d layer (ie nodes behind and in front of the UIKit view). That’s simply impossible, no workarounds either.