내 질문은 매우 간단합니다. 여러 NSAnimation의 델리게이트 인 클래스가 있으며 모든 -(void)animationDidEnd:(NSAnimation *)animation
메시지를 쉽게 정렬 할 수 있도록 NSAnimation에 이름 / 식별자를 제공해야합니다 .
그것을 달성하는 방법에 대한 아이디어가 있습니까?
편집 : 내가 전혀 사용해서는 안된다는 의미로 대답의 부족을 분석해야합니까 NSAnimation
?
음, 애니메이션은 Core Animation에 의해 처리되어야합니다 .보다 강력 NSAnimation
하고 체계적이며 키를 사용하여 애니메이션에 레이블을 지정할 수 있습니다.
#import <QuartzCore/QuartzCore.h>
CALayer* myLayer;
CAKeyframeAnimation *anim = [CAKeyframeAnimation animationWithKeyPath:@"position"];
anim.path = [NSBezierPath bezierPathWithRect:NSMakeRect(0,0,100,100)];
anim.repeatCount = 0;
anim.duration = 3.0;
[bounceLayer addAnimation:anim forKey:@"MyAnimationKey"];
또한 - (void)animationDidStart:(CAAnimation *)theAnimation
우리가 염두에 둔 것을 달성하기 위해 다음과 같은 멋진 델리게이트 메소드 가 있습니다.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다