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. std::binary_serach, std::upper_bound以及std::lower_bound

    c++二分查找的用法 主要是 std::binary_serach,  std::upper_bound以及std::lower_bound 的用法,示例如下: std::vector<int& ...

  2. Swagger2 配置

    1. 每个请求都需要换取key: @Bean public Docket createRestApi() { //添加head参数start ParameterBuilder appId = new ...

  3. HTML-XML数据解析

    HTML代码 <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> ...

  4. linux ssh和scp消除每次问yes/no

    ssh 10.11.3.61The authenticity of host '10.11.3.61 (10.11.3.61)' can't be established.RSA key finger ...

  5. 【POI每日题解 #6】KRA-The Disks

    题目链接 : [POI2006]KRA-The Disks 好有既视感啊... 注意一下输入输出 输入是从上到下输入箱子的宽度 输出是最上面的积木停在哪一层 即 箱子高度 - 积木高度 + 1 在初始 ...

  6. LOJ #2434. 「ZJOI2018」历史(LCT)

    题意 click here 题解 我们首先考虑答案是个什么样的东西, 不难 发现每个点可以单独计算它的贡献. 令每个点 \(i\) 崛起次数为 \(a_i\) . 假设一个点子树的 \(\sum a_ ...

  7. Holiday、Vacation、Days off、Leave、Break

    http://write.scu.edu.tw/view.php?bd=mistake&no=25 這些字在英文的用法中都有放假.休息的意思,但用法卻不太一樣,接下來就來看看它們的不同吧. 『 ...

  8. shiro项目从 log4j1X 迁移到 log4j2X

    先说一下,shiro依赖的项目不是log4j 而是 SLF4J框架. 我们原来用1X版本的jar包如下: log4j-1.2.17.jar slf4j-api-1.7.22.jar slf4j-log ...

  9. 盘点 php 里面那些冷门又实用的小技巧

    1.实用某个字段索引二维数组 取出一个数组的一个字段的值的数组,我们可以使用 array_column, 这个方法还有另外一个用法,如 array_column($array, null, 'key' ...

  10. Linux网络协议栈(一)——Socket入门(2)

    转自: http://www.cnblogs.com/hustcat/archive/2009/09/17/1568765.html 3.套接字的实现套接字最先是在UNIX的BSD版本实现的,所以也叫 ...