2009-07-15 2 views
3

핵심 애니메이션이있는 일부 애니메이션을 수행하고 있지만 애니메이션 블록이 완료되면 알림 또는 이벤트를 알 수있는 방법을 찾지 못했습니다. 예를 들어 UIVIew 애니메이션 블록과 같습니다. 당신이 CAAnimation 인스턴스를 사용하는 경우coreanimation 애니메이션 종료시기 알아보기

setAnimationDidStopSelector: 

가 어떻게, 핵심 애니메이션에 도움

답변

7

에 대한 감사를이 알 수 있으며, 그 위임에 대한 animationDidStop:finished: 봐. 위의 예에서

CAAnimation * animation = [CAAnimation animation]; 
animation.delegate = yourDelegate; // could be self, for example. 
[yourLayer setAnimation:animation forKey:nil]; 

, yourDelegate 애니메이션 단부를 검출 할 수 있도록 animationDidStop:finished: 방법을 구현한다.

+0

CATransition이라면 어떤 차이가 있습니까? animationDidStop : finished :를 호출 할 수 없습니다. –

관련 문제