MPMoviePlayerController re-orientation portrait to landscape and back to portrait (iOS 4.1)

后端 未结 2 945
梦毁少年i
梦毁少年i 2020-12-14 07:26

Since iOS 3.2 the MPMoviePlayerController class allows to embed a movie in the view hierarchy. Now I\'m facing this issue: I create my portrait view by placing an instance

2条回答
  •  青春惊慌失措
    2020-12-14 08:07

    You can use a separate view controller for MPMovieplayer. You don't have to override the

    (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation

    in the original view controller.

    if you are using MPMoviePlayerViewController, everything is already set nicely for you, as the method shouldAutorotateToInterfaceOrientation: will return YES by default. You can use it as a subview or present it modally by calling
    presentMoviePlayerViewControllerAnimated:

提交回复
热议问题