XSLT存档  

不及格的程序员-八神

 查看分类:  ASP.NET XML/XSLT JavaScripT   我的MSN空间Blog

#define DEGREES_TO_RADIANS(d) (d * M_PI / 180)


/* [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.35]; self.rotaImageView.layer.transform = CATransform3DRotate(self.rotaImageView.layer.transform, 3*M_PI, 0, 0, 1); [UIView commitAnimations]; */ CABasicAnimation* rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"]; rotationAnimation.fromValue = [NSNumber numberWithFloat:(DEGREES_TO_RADIANS(180*9))]; rotationAnimation.toValue = [NSNumber numberWithFloat:(DEGREES_TO_RADIANS(0))]; rotationAnimation.fillMode = kCAFillModeForwards; rotationAnimation.removedOnCompletion = NO; rotationAnimation.duration = 0.95f; rotationAnimation.autoreverses = NO; // Very convenient CA feature for an animation like this rotationAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; [self.rotaImageView.layer addAnimation:rotationAnimation forKey:@"rotaAnimation"];

 

posted on 2012-09-24 09:20  不及格的程序员-八神  阅读(372)  评论(0编辑  收藏  举报