Та же проблема. Вот код, который делает то же самое
- (void)beginRotation{
[UIView beginAnimations:@"ghostRotate" context:NULL];
[UIView setAnimationBeginsFromCurrentState:YES];
[UIView setAnimationDuration:5.0];
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(animationDidStop:finished:context:)];
ghostImage.transform = CGAffineTransformMakeRotation(M_PI*0.5);
[UIView commitAnimations];
}
- (void)animationDidStop:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context{
if ([finished boolValue]){
[self beginRotation];
}
}
Когда первая анимация завершается, она вызывает didStop ... Это снова вызывает метод beginAnimation, который сразу же возвращается к didStop снова. Закончено, установлено в 1, и оно входит в условие переполнения стека ...
мысли