29,049
社区成员




- (void)drawRect:(CGRect)rect
{
CGRect boundingRect = CGRectMake(-100, -100, 300, 300);
CAKeyframeAnimation *orbit = [CAKeyframeAnimation animation];
orbit.keyPath = @"position";
orbit.path = CFAutorelease(CGPathCreateWithEllipseInRect(boundingRect, NULL));
orbit.duration = 4;
orbit.additive = YES;
orbit.repeatCount = INFINITY;
orbit.calculationMode = kCAAnimationPaced;
orbit.rotationMode = kCAAnimationRotateAuto;
[self.layer addAnimation:orbit forKey:@"orbit"];
}
这样做是肯定没问题的