IOS 6问题与MPMoviePlayerController [英] IOS 6 Issue with MPMoviePlayerController

查看:93
本文介绍了IOS 6问题与MPMoviePlayerController的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请检查以下代码:

(void) moviePlayerDidExitFullscreen:(NSNotification*)notification 
{

 MPMoviePlayerController *player = [notification object];

[[NSNotificationCenter defaultCenter] removeObserver:self     

name:MPMoviePlayerDidExitFullscreenNotification
                                                  object:player];

 [player setControlStyle:MPMovieControlStyleNone]; 

    if (isPlaying)
    {
        [self stopCurrentMoviePlayer];
    }
}

问题是这在IOS 5中完美运行,但是没有在IOS 6中更新iPad3。

The issue is that this works perfectly in IOS 5, but not working in IOS 6 updates iPad3.

视频完成后电影播放器​​没有关闭,我每次都需要点击完成按钮关闭电影播放器​​。

The movie player is not closing after the video is complete and I need to click done button every time to close the Movie Player.

有人能为这个问题提供解决方案吗?

Can anyone provide a solution for this issue?

推荐答案

点击完成将调用moviePlayerDidExitFullscreen

Clicking done will call moviePlayerDidExitFullscreen

但如果你让电影正常完成,则会调用moviePlaybackDidFinish但是从IOS 6开始它不会退出全屏模式。所以修复是添加player.fullscreen = FALSE;在调用
之前[player.view removeFromSuperview];

But if you let the movie finish normally moviePlaybackDidFinish is called but since IOS 6 it doesn't exit you from fullscreen mode. So the fix is to add player.fullscreen = FALSE; right before calling [player.view removeFromSuperview];

这篇关于IOS 6问题与MPMoviePlayerController的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆