static CGFloat DegreesToRadians(CGFloat degrees) // XXX: マクロでも良いけど関数で実装 { return degrees * M_PI / 180.0f; // 度からラジアンに変換するだけ } static NSString * const kVibrateAnimationKey = @"VibrateAnimationKey"; -(void)vibrated:(BOOL)vibrated view:(UIView *)view { if (vibrated) { CABasicAnimation * animation; animation = [CABasicAnimation animationWithKeyPath:@"transform.rotation"]; animation.duration = 0.25; //