1.

int count = ;
double duration = 10.0f;
for (int i=; i<count; i++) {
//旋转动画
CABasicAnimation *anima3 = [CABasicAnimation animationWithKeyPath:@"transform.rotation"];
anima3.toValue = [NSNumber numberWithFloat:M_PI*];
anima3.beginTime = (1.0/count)*duration*i;
anima3.duration = (1.0/count)*duration;
if (i == ) {
anima3.speed = ;
} else {
anima3.speed = i+;
anima3.repeatCount = i+;
} [arr addObject:anima3];
}
//组动画
CAAnimationGroup *groupAnimation = [CAAnimationGroup animation];
groupAnimation.animations = arr;//[NSArray arrayWithObjects:anima3, nil];
groupAnimation.duration = duration;
groupAnimation.removedOnCompletion = NO; [self.layer addAnimation:groupAnimation forKey:@"groupAnimation"];

第16月第12天 CABasicAnimation 旋转加速的更多相关文章

  1. 第30月第13天 supportedInterfaceOrientationsForWindow旋转

    1. 对于做视频横屏播放的情况下:做旋转有3种方法. 第一种:就是网上说的用旋转矩阵方法CGAffineTransformMakeRotation来做,直接旋转某个view,之后setFrame,至于 ...

  2. C# 获取从1月至12月的月初时间和月末时间

    public IActionResult GetMonthData() { var dataList = new List<object>(); var currentMonth = Da ...

  3. 第27月第12天 webrtc ios openssl boost

    1. source 'https://github.com/CocoaPods/Specs.git' target 'YOUR_APPLICATION_TARGET_NAME_HERE' do pla ...

  4. 第16月第31天 mongo

    1. 94  brew install  mongodb 95  cd ~ 96  cd Desktop/web/ 97  ls 98  mkdir mongo 99  cd mongo/ 100  ...

  5. 第16月第27天 pip install virtualenv ipython sip brew search

    1. pip install virtualenv virtualenv testvir cd testvir cd Scripts activate pip https://zhuanlan.zhi ...

  6. 第16月第26天 /bin/bash^M: bad interpreter: 没有那个文件或目录

    1. 运行脚本时出现了这样一个错误,打开之后并没有找到所谓的^M,查了之后才知道原来是文件格式的问题,也就是linux和windows之间的不完全兼容...具体细节不管,如果验证: vim test. ...

  7. 第16月第25天 tableView设置UITableViewStyleGrouped顶部有空余高度

    1. 正确的处理方法 1)设置标头的高度为特小值 (不能为零 为零的话苹果会取默认值就无法消除头部间距了) UIView *view = [[UIView alloc]initWithFrame:CG ...

  8. 第16月第24天 find iconv sublime utf-8

    1. find . -type f -exec echo {} \; find src -type f -exec sh -c "iconv -f GB18030 -t UTF8 {} &g ...

  9. 第16月第23天 atos

    1. grep --after-context=2 "Binary Images:" *crash xcrun atos -o zhiniao_adhoc_stg1.app.dSY ...

随机推荐

  1. 洛谷 P3657 [USACO17FEB]Why Did the Cow Cross the Road II P

    题面 大意:让你把两个n的排列做匹配,连线不想交,而且匹配的数字的差<=4,求最大匹配数 sol:(参考了kczno1的题解)对于第一个排列从左往右枚举,用树状数组维护到达另一个序列第i个数字的 ...

  2. pgm16

    前面结束了关于 learning 部分一些粗浅的讨论,我们大概明白了一些 learning 中 common sense/techniques.剩下的部分我们分为 causality 和 utilit ...

  3. 【Linux】Screen命令

    1.运行screen [root@master2 ~]# screen 2.执行脚本 [root@master2 ~]# sh mgr.sh 命令帮助 更详细的请使用 man screen查看 htt ...

  4. day27 多态 多继承 接口类 抽象类

    简单来说:多态就是指一个相同的方法名在不同的对象调用的时候实现一样或者不一样的方法实例1: 动物类有个方法 "嚎叫" 狗类也有个方法 "嚎叫" 猫类继承了动物类 ...

  5. 自学Python2.1-基本数据类型-字符串str(object) 上

    自学Python之路 自学Python2.1-基本数据类型-字符串str(object) 上 字符串是 Python 中最常用的数据类型.我们可以使用引号('或")来创建字符串. 创建字符串 ...

  6. 收藏:Non-direct与direct ByteBuffer区别

    相信大家都知道,但是两者的区别在什么地方呢?在不同的环境下采用哪种类型的ByteBuffer会更有效率呢?先解释一下两者的区别:Non-directByteBuffer内存是分配在堆上的,直接由Jav ...

  7. share.js一键分享到微博、QQ空间、QQ好友、微信、腾讯微博、豆瓣、Facebook、Twitter、Linkedin、Google+、点点等

    官网上面 https://github.com/overtrue/share.js非常详细的介绍了share.js他的使用 使用方式有:第一:使用 npm npm install social-sha ...

  8. Codeforces Round #510 (Div. 2)(B)

    传送门:Problem B https://www.cnblogs.com/violet-acmer/p/9682082.html 题意: 如果可以通过喝果汁将维生素A,B,C全部摄取,求最小花费,如 ...

  9. 许仙章鱼TV

    http://v.youku.com/v_show/id_XMTY3NTYwNTE4MA==.html?from=s1.8-1-1.2&spm=a2h0k.8191407.0.0 201608 ...

  10. 'RegAsm.exe' 不是内部或外部命令

    我想从cmd运行regasm.exe.它在c:\windows \Microsoft.net\framework\2.057 中可用 我喜欢这个c:\ regasm.exe 它给予 regasm无法识 ...