我正在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://stackoverflow.com/questions/1423610/how-to-play-movie-in-portrait-mode – 2010-09-30 16:16:11
另一個重複的問題:http://stackoverflow.com/questions/1967932/can-我在播放視頻在肖像模式 – 2010-09-30 16:16:59