绳线左右欢动

CABasicAnimation * squish = [CABasicAnimationanimationWithKeyPath:@"transform"];

CATransform3D rotationTransform =CATransform3DIdentity;

             squish.toValue = [NSValuevalueWithCATransform3D:rotationTransform];

rotationTransform = CATransform3DRotate(rotationTransform, -M_PI/15.0f,0.0, 0.0, 1.0);

squish.duration =0.3f;

squish.repeatCount =2;

squish.autoreverses =NO;

leftLowButton.layer.transform = rotationTransform;


你可能感兴趣的:(绳线左右欢动)