ghiboz
ghiboz

Reputation: 7993

MPMoviePlayerController into a view

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!!

Upvotes: 2

Views: 1119

Answers (1)

Kevin Hoffman
Kevin Hoffman

Reputation: 5152

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.

Upvotes: 2

Related Questions