您好我有這在肖像模式而已。不過我想使mpmovieplayer在風景模式下iPhone應用程序:MPMoviePlayer:調用playVideo在風景模式下
播放視頻我怎樣才能做到這一點運行的iPhone應用程序?
這裏是代碼。
NSString *path = [[NSBundle mainBundle] pathForResource:lblVideoName.text ofType:@"mp4" inDirectory:nil];
NSURL *url = [[NSURL alloc] initFileURLWithPath:path];
NSLog(@"URL== %@",url);
moviePlayer = [[MPMoviePlayerController alloc]
initWithContentURL:url];
moviePlayer.controlStyle = MPMovieControlStyleDefault;
moviePlayer.shouldAutoplay = YES;
[self.view addSubview:moviePlayer.view];
[moviePlayer setFullscreen:YES animated:YES];
請幫助和建議。
感謝
您不需要在MPMovieController中執行任何設置,而是管理視圖方向。 – 2012-03-21 04:51:39