文章来源:淘论文网   发布者: 毕业设计   浏览量: 35



还可以点击去查询以下关键词:
[动画]    [引擎]    [定制]    [FXAnimationEngine]    [动画引擎 定制FXAnimationEngine]   

项目介绍:

Github: https://github.com/ShawnFoo/FXAnimationEngine

这一款用于播放序列帧动画却不会导致占用大量内存的动画引擎.

特征

播放动画时, 只有正在播放的那张图片会占用内存

支持异步线程图片解码

基于CADisplayLink实现

可以设置某段动画块重复次数

使用方式

import "CALayer+FXAnimationEngine.h" in your file first.

// load all image frames NSArray<UIImage *> *frames = ...;FXKeyframeAnimationFXKeyframeAnimation *animation = [FXKeyframeAnimation animationWithIdentifier:@'xxx']; animation.delegate = self; animation.frameImages = frames; animation.duration = 5.5; animation.repeats = 3; // decode image asynchronously [xxxView.layer fx_playAnimationAsyncDecodeImage:animation];FXAnimationGroupFXKeyframeAnimation *animation = [FXKeyframeAnimation animation]; animation.count = 50; // [0, 49] animation.duration = 4.2; FXKeyframeAnimation *animation2 = [FXKeyframeAnimation animation]; animation2.count = 30; // [50, 79] animation2.duration = 1.5; animation2.repeats = 6; // repeat image between index 50 to index 79 six times FXKeyframeAnimation *animation3 = [FXKeyframeAnimation animation]; animation.count = 20; // [80, 99] animation.duration = 2; FXAnimationGroup *animationGroup = [FXAnimationGroup animationWithIdentifier:@'xxxAnimation']; animationGroup.animations = @[animation, animation2, animation3]; animationGroup.frames = frames; animationGroup.delegate = self; [xxxView.layer fx_playAnimation:animation];FXAnimationDelegate- (void)fxAnimationDidStart:(FXAnimation *)anim { // identify your animation by its 'identifier' property } - (void)fxAnimationDidStop:(FXAnimation *)anim finished:(BOOL)finished { // ... }

开题报告开题报告

这里还有:


还可以点击去查询:
[动画]    [引擎]    [定制]    [FXAnimationEngine]    [动画引擎 定制FXAnimationEngine]   

请扫码加微信 微信号:sj52abcd


下载地址: http://www.taolw.com/down/5779.docx
  • 上一篇:上下垂直滚动的跑马灯
  • 下一篇:一款可以简单实现长按拖定制拽重排的 UICellCollectionView Cell框...