#import <QuartzCore/QuartzCore.h>
[UIViewbeginAnimations:@"animationID"context:nil];
[UIViewsetAnimationDuration:0.5f];
[UIViewsetAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIViewsetAnimationRepeatAutoreverses:NO]
indicateImageView.layer.anchorPoint=CGPointMake(0.5,0.5);
indicateImageView.transform =CGAffineTransformMakeRotation([selfradians:0]);
[UIViewcommitAnimations];
-(double)radians:(double)degrees
{
return degrees *M_PI/180;
}
本文详细介绍了如何利用QuartzCore库中的UIView动画API来创建自定义动画效果,包括设置动画ID、持续时间、曲线类型以及重复属性。通过实例演示了如何将旋转动画应用到UIImageView上,并提供了计算角度转换为弧度的辅助函数。
585

被折叠的 条评论
为什么被折叠?



