嘿,我正在尝试根据我得到的数据旋转图像。图像确实旋转,但没有动画。
这是代码..
UIImage *arrowimage = [UIImage imageNamed:@"arrow"];
NSInteger degrees = [_item.current_value integerValue] ;
NSLog(@"ANIMATION!!");
_imageView.image = arrowimage;
_curvalLabel.text = @"";
[UIView animateWithDuration:5.0 animations:^{
_imageView.transform = CGAffineTransformMakeRotation(degrees * M_PI / 180.0);
} completion:^(BOOL finished){
}];