我的程序總是崩潰:類方法沒有找到
-(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