Mon animation peut être exécutée sur plusieurs vues similaires (gérées dans un tableau), mais le gestionnaire d'achèvement ne prend pas de paramètre. Comment puis-je dire à l'heure d'achèvement quelle animation je complète?NSAnimationContext paramètre d'achèvement?
Ce qui suit est utilisé pour animer l'image d'un (de plusieurs) sectionViews. Lorsque l'animation est terminée, je dois être en mesure d'envoyer un avis au sectionView particulier.
NSLog(@"Animation started");
[NSAnimationContext beginGrouping];
[[NSAnimationContext currentContext] setDuration:kAnimationDuration];
[[NSAnimationContext currentContext] setCompletionHandler:^{
[self doStuff];
NSLog(@"Animation complete - now we need to notify the correct sectionView");
}];
[[sectionView animator] setFrame:[self frameForSectionView:sectionView]];
[NSAnimationContext endGrouping];