MPMoviePlayerController处于纵向模式?

时间:2009-09-03 16:37:29

标签: iphone mpmovieplayercontroller

我想知道是否可以在纵向模式下使用MoviePlayer。

感谢您的帮助。

吨。

3 个答案:

答案 0 :(得分:4)

如果您使用[moviePlayer setOrientation:UIDeviceOrientationPortrait animated:NO]; “您的应用程序的API将被Apple Store拒绝

答案 1 :(得分:1)

你可以。请参阅Erica Sadun的文章 http://blogs.oreilly.com/iphone/2008/11/the-joys-of-vertical-audio.html

但请注意,关于这样做的方法没有被Apple记录,因此不推荐。

答案 2 :(得分:1)

@interface MPMoviePlayerController (extend)
-(void)setOrientation:(int)orientation animated:(BOOL)value;
@end

moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:movieUR];
[moviePlayer setOrientation:UIDeviceOrientationPortrait animated:NO];
if (moviePlayer)
{
        [self.moviePlayer play];
}

实施上述代码。你会得到你想要的东西。

希望有所帮助。

萨加尔。

查看以下问题。 它有相同的解决方案。

playing video in custom size screen - view in iphone