【转】让对象沿着某条路径移动的动画效果
来源:互联网 发布:淘宝网销售排行 编辑:程序博客网 时间:2024/05/18 23:24
让对象沿着某条路径移动的动画效果,摘自: http://snipplr.com/view.php?codeview&id=49869
CAKeyframeAnimation *bounceAnimation=[CAKeyframeAnimation animationWithKeyPath:@"position"];bounceAnimation.duration=timeForAnimation; CGMutablePathRef thePath=CGPathCreateMutable(); CGPathMoveToPoint(thePath, NULL, 160, 514);
CGPathAddLineToPoint(thePath, NULL, 160, 350);CGPathAddLineToPoint(thePath, NULL, 160, 406);bounceAnimation.path=thePath;CGPathRelease(thePath); CABasicAnimation *mainAnimation=[CABasicAnimation animationWithKeyPath:@"transform"];mainAnimation.removedOnCompletion=YES;mainAnimation.duration=timeForAnimation;mainAnimation.toValue=[NSValue valueWithCATransform3D:CATransform3DIdentity]; CAAnimationGroup *theGroup=[CAAnimationGroup animation];theGroup.delegate=self;theGroup.duration=timeForAnimation;theGroup.timingFunction=[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn];theGroup.animations=[NSArray arrayWithObjects:bounceAnimation,mainAnimation,nil];[imgV.layer addAnimation:theGroup forKey:@"sagar"];imgV.center=CGPointMake(160, 406);imgV.transform=CGAffineTransformIdentity;
- 【转】让对象沿着某条路径移动的动画效果
- iOS 对象沿着指定路径进行动画
- iOS 对象沿着指定路径进行动画
- Android动画学习Demo(3) 沿着贝塞尔曲线移动的Property Animation
- Android动画学习Demo(3) 沿着贝塞尔曲线移动的Property Animation
- 移动对象过程中加入动画效果
- SVG的路径动画效果
- AS3实现沿着圆弧移动的物体
- iOS简单动画效果:闪烁、移动、旋转、路径、组合、
- 带效果的移动导航条
- 菜单栏点击移动的动画效果
- Qt 之窗口移动的动画效果
- view 的移动和动画效果
- 简单的动画移动效果 web
- 让TextView 有滚动条的效果
- 让你的窗口增加动画效果
- UIView动画移动效果
- 动画效果之简单的移动和移动渐变色
- 用maven构建可以直接运行的jar
- 欧氏距离和余弦相似度
- Android ImageSwitcher和Gallery 综合使用
- 《精通.NET企业项目开发》 - 书摘精要
- C# Socket通信 转自博客园
- 【转】让对象沿着某条路径移动的动画效果
- 这个里面怎么搞积分啊!没有分不能下载想要的东西,郁闷啊!!!
- UITextField-IOS开发
- chroot 与 jail
- 约束(constraints)
- 【e周美文】优秀博客上榜推荐
- tomcat部署web工程的两种方法
- 指针的魅力
- ContentProvider 对外共享数据