MPMoviePlayerController fullscreen mode issue

后端 未结 2 777
暗喜
暗喜 2021-02-11 04:12

I have a problem with my code that plays a video file. Whenever I play the file in fullscreen mode the playback doesn\'t occupy all of my screen. Here is the relevant code:

2条回答
  •  忘了有多久
    2021-02-11 04:47

    Option A: Use the MPMovieViewController instead and display it modally using presentMoviePlayerViewControllerAnimated:.

    Option B: Make sure your switchView (which you use for adding the moviePlayer's view to) actually occupies the entire screen.

    Option C: Readjust the frame of the moviePlayer's view with negative vertical offsets until it fits - eg.: moviePlayer.view.frame = CGRectMake(0.0f, -20.0f, 320.0f, 480.0f);

    Note: MPMoviePlayerController always displays a status bar when using the control style MPMovieControlStyleFullscreen, no matter how the rest of your app handles the status-bar.

提交回复
热议问题