MPMoviePlayerViewController - 更改全屏时如何在 MPMoviePlayerViewController 上保留图像?

发布于 2024-11-16 14:35:33 字数 959 浏览 2 评论 0原文

NSURL *url = [self localMovieURL];
MPMoviePlayerViewController *playerView = [[MPMoviePlayerViewController alloc] initWithContentURL:url];
MPMoviePlayerController *moviePlayer = [playerView moviePlayer];

moviePlayer.controlStyle = MPMovieControlStyleDefault;
moviePlayer.scalingMode = MPMovieControlStyleFullscreen;

[[NSNotificationCenter defaultCenter] addObserver:self
                                         selector:@selector(moviePlayBackDidFinish:)
                                             name:MPMoviePlayerPlaybackDidFinishNotification
                                           object:moviePlayer];

[self setMessageLabel];
[playerView.view addSubview:message];

[self.navigationController presentMoviePlayerViewControllerAnimated:playerView];

你好,

出了点问题.. mpMoviePlayerViewController。

来源>> “message (UILabel)”是全局变量。

视频播放>全屏按钮点击>标签消失了...

我不知道为什么标签消失了。

请有人帮助我。

NSURL *url = [self localMovieURL];
MPMoviePlayerViewController *playerView = [[MPMoviePlayerViewController alloc] initWithContentURL:url];
MPMoviePlayerController *moviePlayer = [playerView moviePlayer];

moviePlayer.controlStyle = MPMovieControlStyleDefault;
moviePlayer.scalingMode = MPMovieControlStyleFullscreen;

[[NSNotificationCenter defaultCenter] addObserver:self
                                         selector:@selector(moviePlayBackDidFinish:)
                                             name:MPMoviePlayerPlaybackDidFinishNotification
                                           object:moviePlayer];

[self setMessageLabel];
[playerView.view addSubview:message];

[self.navigationController presentMoviePlayerViewControllerAnimated:playerView];

hello,

somthing wrong .. mpMoviePlayerViewController.

source > 'message (UILabel)' is global variable.

video play > full screen button click > gone label ...

I don't know Why gone label.

anybody help me please .

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

魂ガ小子 2024-11-23 14:35:33

只是预感,但您应该尝试遵循 MPMoviePlayerDidEnterFullscreenNotification 通知,然后在通知处理程序中执行以下操作,

[message.superview bringSubviewToFront:message];

Just a hunch but you should try following the MPMoviePlayerDidEnterFullscreenNotification notification and then do the following in the notification handler,

[message.superview bringSubviewToFront:message];
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文