1

我怎样才能做到这一点?我不能只将 userInteraction 设置为 NO,因为我仍然需要用户能够通过捏合/缩放来调整视频大小。我只是不希望播放器进入全屏模式。

4

1 回答 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 回答