我正在尝试制作一个记忆游戏。我希望这样,当按下按钮时,它会显示图像变成另一个图像的动画。我在 onceat 方法上放了一些测试代码,没有错误,但是....什么也没发生,没有动画代码
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
// display house
// mHouseNumber=SignTranslation[r];
// NSNumber *convert=[ NSNumber numberWithInt:mHouseNumber];
// mHouse.text=[convert stringValue];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:2];
[UIView setAnimationCurve:UIViewAnimationCurveEaseOut ];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView: mButtona.imageView cache:YES];
mButtona.imageView.image = [ UIImage imageNamed :@"feet1.jpg"]; //end
[UIView commitAnimations];
}