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"];
  • 相关阅读:
    Shell脚本中cd命令使用
    OpenStack 的Nova组件详解
    Linux 查看网络连接状态
    Linux 怎么查看服务的启动进程所占用的目录
    邮政短信 运营商常见错误
    Linux 怎么把自己写的脚本添加到服务里面,即可以使用service命令来调用
    Linux 命令行生成随机密码的十种方法
    Linux rpm安装问题解决
    Codeforces 1082G(最大权闭合子图)
    Codeforces 1105D (BFS)
  • 原文地址:https://www.cnblogs.com/ioriwellings/p/2699568.html
Copyright © 2011-2022 走看看