두 가지 애니메이션 방법이 있습니다. 기본적으로 그냥 반복합니다 ... 중복을 방지하고 깜박임을 방지하려면 어떻게해야합니까?iPhone에서 겹쳐지는 알파 페이드를 제어하는 방법
감사합니다,
-(void) doPowerChangeAnimUp
{
powerIconChange .alpha = 0;
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDidStopSelector:@selector(animationDidStop:)];
[UIView setAnimationDelegate:self] ;
[UIView setAnimationDuration:2];
[powerIconChange setAlpha:1];
[UIView commitAnimations];
}
-(void)animationDidStop:(NSString *)animationID
{
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDelegate:self] ;
[UIView setAnimationDidStopSelector:@selector(doPowerChangeAnimUp)];
[UIView setAnimationDuration:2];
[powerIconChange setAlpha:0];
[UIView commitAnimations];
}
부드러운 "바운스"생성 할 수
코드를 정리할 수 있습니까? 읽기 어려움 – Rudiger