如何在iphone中以肖像模式播放视频
问题描述:
我正在iphone/ipod中创建电影应用程序.i给它添加了一个视频。当我在模拟器中运行它时,它在肖像模式下正常运行。但是当我在ipod中运行我的应用程序时,它会打开一个空白视频并处于横向模式。但在模拟器中,当我点击播放我的视频时,直接播放纵向模式和iPod打开在横向模式下空白视频,我想在纵向模式下如何在iphone中以肖像模式播放视频
这是我的代码用于视频:
-(IBAction)video1:(id)sender
{
NSBundle *bundle =[NSBundle mainBundle];
NSString *moviepath =[bundle pathForResource:@"CRY CRY - 90 Sec Video" ofType:@"mov"];
NSURL *movieURL =[[NSURL fileURLWithPath:moviepath]retain];
MPMoviePlayerController *theMovie =[[MPMoviePlayerController alloc]initWithContentURL:movieURL];
theMovie.scalingMode = MPMovieScalingModeAspectFill;
[theMovie play];
MPMoviePlayerViewController *moviePlayer =[[MPMoviePlayerViewController alloc]initWithContentURL:movieURL];
[self presentMoviePlayerViewControllerAnimated:moviePlayer];
}
请帮我解决这个问题。
重复的问题:http://*.com/questions/1423610/how-to-play-movie-in-portrait-mode – 2010-09-30 16:16:11
另一个重复的问题:http://*.com/questions/1967932/can-我在播放视频在肖像模式 – 2010-09-30 16:16:59