2

I need to play a video into a cocos2d project.. and my question is: how can I put MPMoviePlayerController into my view like this:?

UIView *theView = [[CCDirector sharedDirector] openGLView];

thanks very much!!

ghiboz
  • 7,863
  • 21
  • 85
  • 131

1 Answers1

2

You can't put controllers into views. However, you can put the views that they control into a view. Try this:

// instantiate and configure your MPMoviePlayerController here, c
// call it movieController

[theView addSubview:movieController.view];

disclaimer: I'm at the office so I have no way of knowing if this will work.

Kevin Hoffman
  • 5,154
  • 4
  • 31
  • 33