프로그래밍/iOS
현재 UIView Animation Stop 방법
백룡화검
2011. 6. 2. 01:46
현재 UIView의 Animation 중이라면 특정 액션시 Stop 하는 방법에 대해서 알아보자...
간단하다.....
소스 코드를 보자
//1. 먼저 UIView Animation을 만들고 진행하자....
[UIView beginAnimations:@"test" context:itemView];
[UIView setAnimationRepeatAutoreverses:YES]; // important
[UIView setAnimationRepeatCount:20];
[UIView setAnimationDuration:0.25];
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(testCallt:)];
//2. 특정 액션에서 UIView Animation Stop 하고 싶으면 아래 코드를 넣자..그러면 중지된다~
[itemView.layer removeAllAnimations];