首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

Core Animation卡通

2012-09-28 
Core Animation动画?Core Animation允许你创建高级的动画和虚拟效果? ? ? ?UIKit提供建立在Core Animation

Core Animation动画

?

Core Animation允许你创建高级的动画和虚拟效果

? ? ? ?UIKit提供建立在Core Animation之上的动画。如果你需要比UIKit能力更高级的功能,可以直接使用Core Animation。Core Animation接口包含在Quartz Core框架里。使用Core Animation可以创建嵌套的对象,并且可以沿着x、y、z轴对它们旋转rotation、缩放scale和转换transform。使用Core animation,你可以创建动态的用户界面而不用使用更底层的图形API,如OpenGL ES。

相关参考:

Core Animation类体系

Core Animation核心动画以及基本原理

?

//============================================

一张图片在一定范围内,水平左右移动:
[self.imageView setImage:[UIImage imageNamed:@"推荐页登录按钮.png"]];        CABasicAnimation *theAnimation;            theAnimation=[CABasicAnimation animationWithKeyPath:@"transform.translation.x"];        theAnimation.duration=1;        theAnimation.repeatCount=INT_MAX;        theAnimation.autoreverses=YES;        theAnimation.fromValue=[NSNumber numberWithFloat:0];        theAnimation.toValue=[NSNumber numberWithFloat:-60];        [self.imageView.layer addAnimation:theAnimation forKey:@"animateLayer"]; 
[self.imageView setImage:[UIImage imageNamed:@"推荐页登录按钮.png"]]; CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"transform"]; animation.delegate = self; animation.toValue = [NSValue valueWithCATransform3D:CATransform3DMakeRotation(M_PI , 0, 0, 1.0)]; animation.duration = 1; animation.cumulative = YES; animation.repeatCount = INT_MAX; [self.imageView.layer addAnimation:animation forKey:@"animation"];

??

Core Animation相关动画Core Animation教学:关键桢动画Core Animation教学:窗口淡入淡出特效Core Animation教学:使用Transitions制作带动画效果的向导对话框

?

?

?

??

?

热点排行