私は次のシナリオを持っています
クラスに MPMovieController があり、正常に再生されています。ボタンをクリックすると、そのMPMovieControllerを他のクラスに移動し、そのクラスのビューに追加したいこのために、私はこれを行いました
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
ImageViewController *imageViewClass = (ImageViewController *)[storyboard instantiateViewControllerWithIdentifier:@"ImageViewClass"];
imageViewClass.moviee=_moviePlayerReference;
[self presentViewController:imageViewClass animated:YES completion:nil];
問題は、その MPMovieController オブジェクトを他のクラス (otherclass ビューにサブビュー MPMoviePlayer オブジェクトのビューを追加) に追加するときに、最初のクラスから削除されることです。同じ参照を渡している可能性があります。したがって、MPMovieController のコピーを作成してから、元のオブジェクトを変更しないように 2 番目のクラスに渡したいと考えています。これどうやってするの。