iOS アプリでムービー アニメーションを使用するために、AVAnimator ライブラリを使用しています。アニメーションは正常に動作していますが、アニメーションが終了したら削除できる必要があり、前のアニメーションが完了する前でも同じアニメーションを上に再生できるようにする必要があります。
アニメーション化に使用しているコードは次のとおりです。
bassView = [AVAnimatorView aVAnimatorViewWithFrame:CGRectMake(322,460,375,224)];
AVAnimatorMedia *media = [AVAnimatorMedia aVAnimatorMedia];
AV7zAppResourceLoader *resLoader = [AV7zAppResourceLoader aV7zAppResourceLoader];
resLoader.archiveFilename = @"Archive.7z";
resLoader.movieFilename = @"bass_iPad.mvid";
resLoader.outPath = [AVFileUtil getTmpDirPath:@"bass_iPad.mvid"];
media.resourceLoader = resLoader;
AVMvidFrameDecoder *frameDecoder = [AVMvidFrameDecoder aVMvidFrameDecoder];
media.frameDecoder = frameDecoder;
media.animatorFrameDuration = AVAnimator10FPS; // this is a constant I made for the frame rate
[media prepareToAnimate];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(animatorDoneNotification:)
name:AVAnimatorDoneNotification
object:media];
[mainView addSubview:bassView];
[bassView attachMedia:media];
[media startAnimator];
- (void)animatorDoneNotification:(NSNotification*)notification {
NSLog(@"animation done");
AVAnimatorMedia *media = notification.object;
[media stopAnimator];
[bassView removeFromSuperview];
}