一旦我打开我的应用程序,我必须播放视频,当视频完成时,我必须在该视频上添加一个 UI 按钮,是否可能,我已经搜索但我找不到链接,如果有人有通过这种情况,并解决了它,你能告诉我怎么做吗?添加视频的代码是:
- (void)viewDidLoad {
NSString *url = [[NSBundle mainBundle] pathForResource:@"splash_screen"ofType:@"mp4"];
MPMoviePlayerController *player = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:url]];
player.view.frame = self.view.bounds;
[self.view addSubview:player.view];
[player play];
[super viewDidLoad];
}