repeatCount和repeatDuration
来源:互联网 发布:win10win7共享网络 编辑:程序博客网 时间:2024/06/03 23:00
1. repeatCount
_layer = [CALayerlayer];
[_layersetFrame:CGRectMake(300,50, 100,200)];
[_layersetBackgroundColor:[UIColorredColor].CGColor];
[self.view.layeraddSublayer:_layer];
CABasicAnimation *animation = [CABasicAnimationanimationWithKeyPath:@"transform.rotation"];
[animation setDuration:2];
[animation setRepeatCount:3.5];
[animation setToValue:@(M_PI_2)];
[_layeraddAnimation:animation forKey:@"rotationAnimation"];
2.
_layer = [CALayerlayer];
[_layersetFrame:CGRectMake(300,50, 100,200)];
[_layersetAnchorPoint:CGPointMake(1,0.5)]; //锚点x等于1表示绕右侧的轴旋转; 0 表示绕左侧的轴旋转
[_layersetBackgroundColor:[UIColorredColor].CGColor];
[self.view.layeraddSublayer:_layer];
CATransform3D perspective =CATransform3DIdentity;
perspective.m34 = -1.0 /500.0;
self.view.layer.sublayerTransform = perspective;
CABasicAnimation *animation = [CABasicAnimationanimation];
animation.keyPath =@"transform.rotation.y";
animation.toValue =@(M_PI_4);
[animation setRepeatDuration:2];
[animation setAutoreverses:YES];
[_layeraddAnimation:animation forKey:nil];
- repeatCount和repeatDuration
- android:repeatCount="infinite"在set中无效
- . 和 ->
- || 和&&
- .和::
- “?”和“!”
- #和##
- && 和 ||
- 、和
- #和##
- .//和..//
- 和
- ?和\?
- ./ 和 ../
- #和##
- #、和##
- #和##
- *和&
- 2016.01.21-------html5第二天
- centos6.5下安装nginx1.8.0
- 批量执行语句之——禁用所有表的外键
- SEAndroid原理分析
- 槽函数的好处
- repeatCount和repeatDuration
- codeforces 257C解题报告
- MAC 10.10.5编译opencv3.0(java版本)
- Android keystore 的MD5、SHA1值获取方法
- 小乔落花流水
- 嵌入式系统学习入门篇之-----开门探头
- 【Web前端】Js利用正则表达式提取字符串
- codeforces 148E
- 蓝桥杯 01背包