我尝试使用pop框架(https://github.com/facebook/pop)向上/向下或向左/向右翻转三角形时遇到问题。
如何将我拥有的代码转换为pop?
java.lang.SecurityException: Access Control Enforcer: access denied: could not open channel
答案 0 :(得分:0)
在您使用fromValue
时,它将不会被初始化。试试这段代码......
[_baseLayer pop_removeAnimationForKey:@"kAnimationRotate"];
//rotate with pop, at some point this starts to rotate more than 120
POPSpringAnimation *rotateAnimation = [POPSpringAnimation animationWithPropertyNamed:kPOPLayerRotation];
[_baseLayer pop_addAnimation:rotateAnimation forKey:@"kAnimationRotate"];
rotateAnimation.toValue = @([rotateAnimation.fromValue floatValue] + 120/360.0f*(2*M_PI));
rotateAnimation.springBounciness = 10.0f;
rotateAnimation.springSpeed = 25.0f;