类似加入购物车的抛物线动画
来源:互联网 发布:日照淘宝客服 编辑:程序博客网 时间:2024/05/17 06:44
CAKeyframeAnimation *keyframeAnimation=[CAKeyframeAnimation animationWithKeyPath:@"position"];//抛物线运动 CGMutablePathRef path = CGPathCreateMutable(); CGPathMoveToPoint(path, NULL, testView.layer.position.x, testView.layer.position.y);//移动到起始点 CGPathAddQuadCurveToPoint(path, NULL, midPoint.x, midPoint.y, endPoint.x, end.y); keyframeAnimation.path = path; keyframeAnimation.delegate = self; CGPathRelease(path); keyframeAnimation.duration = 2; [testView.layer addAnimation:keyframeAnimation forKey:@"KCKeyframeAnimation_Position"]; //旋转运动 CABasicAnimation *basicAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"]; basicAnimation.duration = 0.2; basicAnimation.repeatCount = 10; basicAnimation.removedOnCompletion = NO; basicAnimation.toValue = @(M_PI); [testView.layer addAnimation:basicAnimation forKey:@"basic"]; //缩放运动 CABasicAnimation *scaleAnimation = [CABasicAnimation animationWithKeyPath:@"transform.scale"]; scaleAnimation.duration = 2; scaleAnimation.toValue = @(0.1); [testView.layer addAnimation:scaleAnimation forKey:@"scale"];
0 0
- 类似加入购物车的抛物线动画
- 商品加入购物车抛物线下坠的动画
- 仿天猫加入购物车,商品做抛物线动画
- Android贝塞尔曲线实现加入购物车抛物线动画
- 仿购物车点击图片,沿着抛物线加入篮子动画
- CSS3 抛物线 加入购物车
- CSS3 抛物线 加入购物车
- 加入购物车的抛物线小球运动效果
- 加入购物车的抛物线过程fly插件
- 加入购物车抛物线效果的基本实现(一)
- 实现购物车点击添加的抛物线动画效果
- 基于jquery fly插件实现加入购物车抛物线动画效果
- 基于jquery fly插件实现加入购物车抛物线动画效果
- 加入购物车动画
- 加入购物车动画
- 购物车的抛物线运动
- 商品加入购物车的动画
- 实用的添加购物车抛物线动画和自由落体类型动画
- Non blocking IO web server
- spring util schema
- 在本地使用GroboUtils进行多线程测试
- Eclispse中Run on Server窗口让选择Server,但已经存在的选择不了
- mybatis批量插入
- 类似加入购物车的抛物线动画
- 使用Python将MNIST数据集转化为图片
- org.hibernate.InvalidMappingException: Could not parse mapping document from resource
- Linux LVM分区管理、扩展
- WebService上传大文件报错解决
- 圆周旋转的思路
- 6572平台加入系统权限后启动不了应用的原因
- centos6安装mysql5.6
- 一步步教你看懂大数据时代下的“用户画像”