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. Systemed systemctl 创建服务 详解

    原文:http://www.ruanyifeng.com/blog/2016/03/systemd-tutorial-commands.html 一.由来 历史上,Linux 的启动一直采用init进 ...

  2. GitHub && GitLab

    1.github介绍 Git作为一个开源的分布式版本控制系统,已经被越来越多的人使用,随之需要的就是需要有个专门的地方存储.管理通过Git上传的项目,这就是gitHub gitHub是一个面向开源及私 ...

  3. docker --Nexus仓库

    Nexus 简介 Nexus 是个仓库管理器,目前主要分2大版本:2.X 和 3.X.2.X 主要支持的格式是Maven.P2.OBR.Yum.3.X主要支持的是Docker.NuGet.npm.Bo ...

  4. day26 多继承

    class A(object): def test(self): print('from A') class B(A): def test(self): print('from B') class C ...

  5. (未完成...)Python3网络爬虫(2):利用urllib.urlopen向有道翻译发送数据并获得翻译结果

    环境: 火狐浏览器 pycharm2017.3.3 python3.5 1.url不仅可以是一个字符串,例如:http://www.baidu.com.url也可以是一个Request对象,这就需要我 ...

  6. Git储藏与恢复

    cd /f cd android git status echo 'shoping' >> 4 //修改内容 git status git stash //git储藏 git status ...

  7. 洛谷P4035 [JSOI2008]球形空间产生器(高斯消元)

    洛谷题目传送门 球啊球 @xzz_233 qaq 高斯消元模板题,关键在于将已知条件转化为方程组. 可以发现题目要求的未知量有\(n\)个,题目却给了我们\(n+1\)个点的坐标,这其中必有玄机. 由 ...

  8. BSGS

    北上广深/拔山盖世算法. yaT+b = z mod p p为质数,Hash表存b,枚举a,复杂度p0.5 记得特判y = 0的情况. inline void solve3() { Hash::cle ...

  9. 洛谷P1315 观光公交

    SB贪心......暴露了我代码能力巨弱的本质. 题面 解:首先我们应该想到DP(但是我想到了贪心......) 然后分析题目本质,每个点有个限制,最早开走时间不得早于最晚上车时间. 然后我们就可以把 ...

  10. 【模板】K短路 A-star

    引理:当一个状态对应的节点第K次从堆中取出时,该状态对应的当前代价是从起点到该点的第K优解. 代码如下 /* POJ2449 */ #include <cstdio> #include & ...