我的程序总是崩溃:类方法没有找到
-(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];
}
}
我到底做错了什么?
可能的重复[苹果拒绝的应用程序,因为animationDidStop:已完成:上下文:是非公开API](http://stackoverflow.com/questions/3455604/apple-rejected-app-because-of-animationdidstopfinishedcontext-是非公开的) – trojanfoe