开发者

MPMoviePlayerController into a view

开发者 https://www.devze.com 2023-01-02 17:22 出处:网络
I need to play a video into a cocos2d p开发者_Python百科roject.. and my question is: how can I put MPMoviePlayerController into my view like this:?

I need to play a video into a cocos2d p开发者_Python百科roject.. and my question is: how can I put MPMoviePlayerController into my view like this:?

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

thanks very much!!


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消