【发布时间】:2012-02-23 07:49:09
【问题描述】:
如何使用基于块的动画将 UIImageView 旋转 360 度?
这是我的尝试,但它重复 180 次旋转而不是两个连续的动画
void (^anim) (void) = ^{
uiImgDisc.transform = CGAffineTransformMakeRotation(3.14159265);
};
void (^after) (BOOL) = ^(BOOL f){
[UIView animateWithDuration:1
delay:0
options:UIViewAnimationCurveLinear
animations:^(void){
uiImgDisc.transform = CGAffineTransformMakeRotation(3.14159265);
}
completion:nil];
};
[UIView animateWithDuration:1
delay:0
options:UIViewAnimationCurveLinear | UIViewAnimationOptionRepeat
animations:anim
completion:after];
【问题讨论】:
标签: iphone objective-c core-animation