我想要两个 MPMoviePlayerControllers。所以我首先在点击按钮后将其添加到操作方法中:
MPMoviePlayerController *movieController= [[MPMoviePlayerController alloc] initWithContentURL: yURL];
[movieController prepareToPlay];
[movieController.view setFrame: self.view.bounds];
[self.view addSubview: movieController.view];
[movieController play];
这行不通!我正在遵循这种方法,以便我可以在同一视图上添加另一个玩家。但是当我尝试将其添加到 .h
@property (nonatomic, strong) MPMoviePlayerControllers *moviePlayer;
这对.m
self.movieController= [[MPMoviePlayerController alloc] initWithContentURL: yURL
[self.movieController.view setFrame: self.view.bounds];
[self.view addSubview: self.movieController.view];
[self.movieController play];
它完美无缺!有人可以向我解释吗?以及如何在视图中添加多个视频播放器,例如填充每个单元格中都有一个播放器的表格?