如何隐藏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/