gpt4 book ai didi

ios - 如何隐藏 MPmoviePlayerController 控制栏

转载 作者:可可西里 更新时间:2023-11-01 05:02:58 24 4
gpt4 key购买 nike

如何隐藏MPmoviePlayerController控制栏。

我只是想让电影全屏显示,什么也没有。

NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:dataPath ofType:@""]];
moviePlayerController = [[MPMoviePlayerController alloc] initWithContentURL:url];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(moviePlaybackComplete:)
name:MPMoviePlayerPlaybackDidFinishNotification
object:moviePlayerController];

[self.view addSubview:moviePlayerController.view];
[moviePlayerController.view setFrame:CGRectMake(0, 0, 1024, 768)];
moviePlayerController.fullscreen = YES;
if ([moviePlayerController respondsToSelector:@selector(setAllowsAirPlay:)])
//Allow airplay ifavailabe
[moviePlayerController setAllowsAirPlay:YES];

[moviePlayerController play];

最佳答案

moviePlayerController.controlStyle = MPMovieControlStyleNone;

关于ios - 如何隐藏 MPmoviePlayerController 控制栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9374149/

24 4 0