zoukankan      html  css  js  c++  java
  • 视图旋转方式 不及格的程序员

    #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"];
  • 相关阅读:
    sql交集、差集、并集
    控件自适应文本宽度
    pivot列行转换,自动计算分组,解决groupby问题
    echart-scatter使用散点图,带坐标和项目名称
    下载文件根据浏览器判断文件名,解决兼容性问题
    sql中类型转换涉及的性能差异之convert和cast
    js使用正则表达式对文本框进行限制输入
    Aspose.Words.dll根据模板生成word详解
    Windows服务开发
    SqlBulkCopy学习(导入海量数据的类)
  • 原文地址:https://www.cnblogs.com/ioriwellings/p/2699568.html
Copyright © 2011-2022 走看看