的MPMoviePlayerController不再景觀默認工程,以便使其在景觀工作,你需要申請轉換來的觀點。
UIView * playerView = [moviePlayerController view];
[playerView setFrame: CGRectMake(0, 0, 480, 320)];//iPhone
CGAffineTransform landscapeTransform;
landscapeTransform = CGAffineTransformMakeRotation(90*M_PI/180.0f);
landscapeTransform = CGAffineTransformTranslate(landscapeTransform, 80, 80);
[playerView setTransform: landscapeTransform];
In addition, if you want the regular full screen controls, use the following sample.
moviePlayerController.fullscreen = TRUE;
moviePlayerController.controlStyle = MPMovieControlStyleFullscreen;
這是您的信息「playing a video with MPMoviePlayerController in Portrait WITHOUT Private API-Will get rejected by Apple」。好運氣和幸福的編碼:-)
您創建視頻或轉換視頻?...我沒有看到編碼線路單。 .paste編碼部分,以便我們可以瞭解你正在嘗試做什麼..你正在使用任何私人API? –