1
我试图使用UIViewAnimationOptionTransitionFlipFromTop
来实现下面的动画,它不起作用并立即改变图像。以下是我使用的代码:UIButton没有UIViewAnimationOptionTransitionFlipFromTop的动画
[self.thanksButton setImage:[UIImage imageNamed:@"frame1_image"] forState:UIControlStateNormal];
[UIView animateWithDuration:3.0 delay:0 options:UIViewAnimationOptionTransitionFlipFromTop animations:^{
} completion:^(BOOL finished) {
[self.thanksButton setImage:[UIImage imageNamed:@"frame4_image"] forState:UIControlStateNormal];
}];
还试图通过一个使用嵌套动画这样的图像分成四个不同的框架和应用这些图像之一,
[UIView animateWithDuration:3.0 animations:^{
[self.thanksButton setImage:[UIImage imageNamed:@"frame2_image"] forState:UIControlStateNormal];
} completion:^(BOOL finished) {
[UIView animateWithDuration:3.0 animations:^{
[self.thanksButton setImage:[UIImage imageNamed:@"frame3_image"] forState:UIControlStateNormal];
} completion:^(BOOL finished) {
[UIView animateWithDuration:3.0 animations:^{
[self.thanksButton setImage:[UIImage imageNamed:@"frame4_image"] forState:UIControlStateNormal];
} completion:^(BOOL finished) {
}];
}];
}];
请让我知道需要什么在这里固定。以下是动画:
谢谢,虽然必须有一个本地方法。但是这对我来说是个诡计!谢谢! –