iOS视图动画效果 CPAnimationSequence

码农软件 · 软件分类 · 图形/图像处理 · 2019-09-08 07:13:36

软件介绍

编写iOS视图UIView的动画效果需要很多代码,虽然iOS 4支持块定义,对视图动画的定义减少了不少代码,但语法依旧不好看。CPAnimationSequence是一个开源代码库,可以一种间接快捷的方式来定义描述动画队列,克服了写繁多的代码。

下面一个使用例子:
CPAnimationSequence* shakespeare = [CPAnimationSequence sequenceWithSteps:
    [CPAnimationStep           for:0.2 animate:^{ self.romeo.alpha = 1.0; }],
    [CPAnimationStep           for:0.2 animate:^{ self.julia.alpha = 1.0;  }],
    [CPAnimationStep after:1.0 for:0.7 animate:^{
                            CGPoint love = CGPointMake((self.romeo.center.x + self.julia.center.x)/2,
                                                       (self.romeo.center.y + self.julia.center.y)/2);
                            self.romeo.center = love;
                            self.julia.center = love;
    }],
    [CPAnimationStep after:2.0 for:0.5 animate:^{ self.romeo.alpha = 0.0;
                                                  self.julia.alpha = 0.0; }]
    nil];
[shakespeare run];

本文地址:https://www.codercto.com/soft/d/14121.html

Algorithms Sequential & Parallel

Algorithms Sequential & Parallel

Russ Miller、Laurence Boxer / Charles River Media / 2005-08-03 / USD 59.95

With multi-core processors replacing traditional processors and the movement to multiprocessor workstations and servers, parallel computing has moved from a specialty area to the core of computer scie......一起来看看 《Algorithms Sequential & Parallel》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具