使用MPMoviePlayerController播放电影时隐藏状态 [英] Hide the status while playing movie using MPMoviePlayerController

查看:137
本文介绍了使用MPMoviePlayerController播放电影时隐藏状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用 [[UIApplication sharedApplication] setStatusBarHidden:YES]; 隐藏了我的应用程序中的状态栏。但是当我播放电影然后自动显示顶部的状态栏。

I already hide the status bar in my application using [[UIApplication sharedApplication] setStatusBarHidden:YES];. But when I play movie then automatically it display the status bar on the top.

有人知道如何在播放电影时隐藏状态栏。

Does anyone knows that how to hide the status bar while playing movie.

推荐答案

MPMoviePlayerViewController *playercontroller = [[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL fileURLWithPath:path]];
    [AppShare.viewController presentMoviePlayerViewControllerAnimated:playercontroller];
    //[self.view addSubview: playercontroller.view];
    [self.view addSubview:playercontroller.view];
    playercontroller.moviePlayer.view.frame = CGRectMake(0.0, 0.0, 320.0, 480.0);
    playercontroller.moviePlayer.scalingMode = MPMovieScalingModeAspectFill;
    playercontroller.moviePlayer.movieSourceType = MPMovieSourceTypeFile;
    playercontroller.moviePlayer.controlStyle = MPMovieControlStyleNone;
    [playercontroller.moviePlayer prepareToPlay];
    [playercontroller.moviePlayer play];
    playercontroller = nil;

这篇关于使用MPMoviePlayerController播放电影时隐藏状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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