【发布时间】:2012-03-17 16:57:23
【问题描述】:
我正在尝试在我的电影播放器中实现通知,以便电影播放完毕后,它将退出全屏。到目前为止,我在下面发布了代码。 IBAction 连接到一个按钮。另外在旁注中,我一直在试图弄清楚如何在我的电影视图顶部获得“播放符号”,以便用户只需按下它,视频就会开始。有人知道如何实现吗?
- (void)viewDidLoad
{
//Video player
NSString *url = [[NSBundle mainBundle] pathForResource:self.navigationItem.title ofType:@"mov"];
_player = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath: url]];
_player.view.frame = CGRectMake(350, 200, 400, 400);
[self.view addSubview:_player.view];
}
- (IBAction)playMovie
{
[_player play];
}
【问题讨论】:
标签: ios5 xcode4.2 mpmovieplayercontroller fullscreen