我怎样才能做到这一点?我不能只将 userInteraction 设置为 NO,因为我仍然需要用户能够通过捏合/缩放来调整视频大小。我只是不希望播放器进入全屏模式。
问问题
1554 次
1 回答
0
希望这可以帮助!!
- (void)viewDidLoad {
[super viewDidLoad];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(movieEventFullscreenHandler:)
name:MPMoviePlayerWillEnterFullscreenNotification
object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(movieEventFullscreenHandler:)
name:MPMoviePlayerDidEnterFullscreenNotification
object:nil];
self.moviePlayer.controlStyle = MPMovieControlStyleEmbedded;
}
- (void)movieEventFullscreenHandler:(NSNotification*)notification {
[self.moviePlayer setFullscreen:NO animated:NO];
[self.moviePlayer setControlStyle:MPMovieControlStyleEmbedded];
}
于 2012-07-16T18:17:16.243 回答