CABasicAnimation *rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];
[rotationAnimation setRepeatCount:0];
[rotationAnimation setDuration:0.6];
[rotationAnimation setAutoreverses:NO];
//以下两行同时设置才能保持移动后的位置状态不变
rotationAnimation.fillMode=kCAFillModeForwards;
rotationAnimation.removedOnCompletion = NO;
[rotationAnimation setFromValue:[NSNumber numberWithFloat:0.0]];
[rotationAnimation setToValue:[NSNumber numberWithFloat:(float) (M_PI/value)*derection]];
[self addAnimation:rotationAnimation forKey:kBTSWiggleTransformAnimation];