我通过以下代码旋转饼图
-(BOOL)plotSpace:(CPTPlotSpace *)space shouldHandlePointingDeviceDownEvent:(id)event atPoint:(CGPoint)point
{
CABasicAnimation *rotation = [CABasicAnimation animationWithKeyPath:@"transform.rotation"];
rotation.removedOnCompletion = NO;
rotation.fromValue = [NSNumber numberWithFloat:M_PI_4];
rotation.toValue = [NSNumber numberWithFloat:M_PI_4+10];
rotation.duration = 1.0f;
rotation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionDefault];
rotation.delegate = self;
pieChart.startAngle = M_PI_4+10;
[pieChart addAnimation:rotation forKey:@"rotation"];
return YES;
}
但是在旋转饼图回到它的初始位置之后。但我想现在饼图应该处于旋转角度。如何在这里取得成功?