在我的应用程序中,我试图使用来自服务器的URL播放视频。我使用UITableView
来显示视频列表,并通过点击列表中的单元格,视频将在子视图中播放。现在我想以横向模式播放视频。在横向模式下播放视频iOS 7
这是当前的视频代码。
_movieplayer = [[MPMoviePlayerController alloc]initWithContentURL: [NSURL URLWithString:[self urlencode:self.strPlayUrl]]];
[[_movieplayer view] setFrame: CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height)];
[self.view addSubview: [_movieplayer view]];
[_movieplayer setShouldAutoplay:YES];
[_movieplayer prepareToPlay];
[self.movieplayer play];
在上面的代码中,我如何使它工作以便在横向模式下播放。请在此引导我。长期以来一直陷在这个问题上。
好的问题
shouldAutorotateToInterfaceOrientation
和supportedInterfaceOrientations
方法。也有同样的问题。你有没有得到解决方案? – Mohit