使用以下代码时,我遇到了一个问题,它没有更改为纵向模式:
NSString *url = @"http://abc.com/movie.3gp"; MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL URLWithString:url]]; moviePlayer.scalingMode = MPMovieScalingModeAspectFill; // 注释这一行时没有看到任何变化 if([moviePlayer respondsToSelector:@selector(setOrientation:animated:)]) [moviePlayer setOrientation:UIDeviceOrientationPortrait 动画:NO]; [电影播放器播放];
我的代码有问题吗?任何人都可以解决我的问题或任何替代方案?
谢谢。