开发者

MPMoviePlayerController - play fullscreen

Starting with this code:

MPMoviePlayerController *player = [[MPMoviePlayerController alloc] initWithContentURL:movieLink];

The next thing I need to do is set the player's frame and add its view as a subview. But I want it to go immediately to fullscreen, and I want it to be on top of everything else. What is the best way to do that?

If I do something like this:

[self.view addSubview:player.view];

The player does a weird resizing thing, then jumps to fullscreen. I know this is the last step:

[player setFullscreen:YES animated:NO];

But where can I add the player's view so that I don't see any weird开发者_运维问答 clipping or resizing? Do I use [UIScreen mainScreen] somehow? Or access the main window of the app?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜