animation
来源:互联网 发布:微波电路s参数矩阵 编辑:程序博客网 时间:2024/05/21 14:10
[NSNumber numberWithFloat:1.0];
)transform.rotation.y角度,y轴()transform.rotation.z角度,z轴transform.rotation
角度scale.x范围,x轴scale.y范围,y轴scale.z
范围,z轴scale范围position.xx轴的位置position.yy轴的位置position.zz轴的位置position位置([NSValue valueWithCGPoint:groupLayer.position])
//演员初始化
CALayer* groupLayer = [[CALayeralloc]init];
groupLayer.frame = CGRectMake(60, 340+100+kYOffset,50,50);
groupLayer.cornerRadius = 10;
groupLayer.backgroundColor = [UIColorcolorWithPatternImage:[UIImageimageNamed:@"heart.png"]].CGColor;
[self.view.layeraddSublayer:groupLayer];
//设定剧本
CABasicAnimation* moveAnimation =
[CABasicAnimationanimationWithKeyPath:@"position.x"];
moveAnimation.fromValue = [NSNumbernumberWithFloat:groupLayer.position.x];
moveAnimation.toValue = [NSNumbernumberWithFloat:300];
moveAnimation.autoreverses = YES;
moveAnimation.repeatCount =MAXFLOAT;
moveAnimation.duration = 2;
/*
CABasicAnimation* moveAnimation = [CABasicAnimation animationWithKeyPath:@"position"];
moveAnimation.fromValue = [NSValue valueWithCGPoint:groupLayer.position];
moveAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(320-80, groupLayer.position.y)];
moveAnimation.autoreverses = YES;
moveAnimation.repeatCount =MAXFLOAT;
moveAnimation.duration = 2;
[groupLayer addAnimation:moveAnimation forKey:@"scaleAnimation"];
*/
//开演
[groupLayer addAnimation:moveAnimation forKey:@"scaleAnimation"];
- animation
- animation
- Animation
- Animation
- Animation
- Animation
- Animation
- Animation
- Animation
- Animation
- animation
- Animation
- Animation
- animation
- Animation
- Animation
- Animation
- Animation
- C++第三次试验2.1
- 关于表单提交数据转Json
- Mapper抽象类参数
- C++第三次上机实验作业
- dbm的功率计算方法
- animation
- java-eclipse-创建maven项目
- Auto property synthesis will not synthesize property …because it is ‘readwrite’ but it will be synth
- VS2005为什么有些解决方案不能生成,显示已跳过,也不能编译?打开属性,总是报错。
- 谷歌离线地图API解析
- 关于LoadRunner中pacing值的设置的意义
- MapReduce:详解Shuffle(copy,sort,merge)过程
- UIButton
- linux内核技术文章