我的程序不断崩溃:
-(void) moveImage:(UIImageView *)image duration:(NSTimeInterval)duration curve:(int)curve x:(CGFloat)x y:(CGFloat)y key:(NSString *)key
{
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:duration];
[UIView setAnimationCurve:curve];
[UIView setAnimationBeginsFromCurrentState:YES];
[UIView setAnimationDidStopSelector:@selector(animationDidStop:)];
CGAffineTransform transform = CGAffineTransformMakeTranslation(x, y);
image.transform = transform;
[UIView commitAnimations];
}
这被调用,完成后我希望它调用下面的方法:
-(void)animationDidStop:(NSString *)key
{
if (key == @"burn") {
//The burn card has been moved and stopped. Ready for the next.
[self annPlayerRight];
}
}
我究竟做错了什么?