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"];
  • 相关阅读:
    google PR值突然调整,貌似出什么问题了
    【转自译言】在线劝说:7种说服人们网络购买的方法
    马化腾关于产品设计与用户体验的培训
    北京站售票人员倒票视频
    大型网站架构不得不考虑的10个问题
    在谈电子商务名词解释
    GridView
    CheckBoxList
    ShoppingCart
    MongoDB数据库简介及安装
  • 原文地址:https://www.cnblogs.com/ioriwellings/p/2699568.html
Copyright © 2011-2022 走看看