在使用核心图开发饼图时,我为给定代码添加了动画
CABasicAnimation *rotation = [CABasicAnimation animationWithKeyPath:@"transform"];
CATransform3D transform = CATransform3DMakeRotation(DegreesToRadians(360), 0, 0, 1);
rotation.toValue = [NSValue valueWithCATransform3D:transform];
rotation.duration = 10.0f;
[pieChart addAnimation:rotation forKey:@"rotation"];
此代码给出以下错误语义问题:
Implicit declaration of function 'DegreesToRadians' is invalid in C99
我能做些什么来避免这种情况?
并且运行时也会出现以下错误:
Apple_o Linker id error "_DegreesToRadians", referenced from:
谢谢并恭祝安康
维杰亚古玛
Rhytha 的 iOS 开发人员