특정 기간 내에 애니메이션을 만들고 싶습니다. 내 코드는 다음과 같습니다 :애니메이션이 경과 한 후 애니메이션이 계속됩니다.
- (void)animate{
NSArray *myImages = [[NSArray alloc] initWithObjects:
[UIImage imageNamed:@"01.png"],
[UIImage imageNamed:@"02.png"],
[UIImage imageNamed:@"03.png"],
[UIImage imageNamed:@"04.png"],
[UIImage imageNamed:@"05.png"],
[UIImage imageNamed:@"06.png"],
[UIImage imageNamed:@"07.png"],
[UIImage imageNamed:@"08.png"],
[UIImage imageNamed:@"09.png"],
[UIImage imageNamed:@"10.png"],
[UIImage imageNamed:@"11.png"],
[UIImage imageNamed:@"12.png"],
[UIImage imageNamed:@"13.png"],
nil];
faceImage.animationImages = myImages;
faceImage.animationDuration = 4.0;
faceImage.animationRepeatCount = 4;
[faceImage startAnimating];
}
지금 문제가 경과 animationDuration 후, animationRepeatCount이 몇 초 동안 계속됩니다! 하지만 나는 4 초 내에 animationRepeatCount를 만들고 싶다. 4 초 후에 내 애니메이션이 멈춰야합니다! 내 코드를 수행하는 데 문제가 무엇입니까? 아니면 어떻게 해결할 수 있습니까?
애니메이션 재생 시간은 1 – Impossible
입니다. 시퀀스를 반복 할 때마다 16 초, 4 초가 걸립니다. 문서에 모두 나와 있습니다. – rdelmar
그래서 @rdelmar와 요구 사항에 따라 다음과 같이 할 수 있습니다 : faceImage.animationDuration = 1.0; faceImage.animationRepeatCount = 4; – Amit