JTBorderDotAnimation

https://github.com/jonathantribouharet/JTBorderDotAnimation

JTBorderDotAnimation is a simple animation for have dots turning around a UIView on iOS.

JTBorderDotAnimation是一个很简单的动画效果,用于给UIView添加点的循环移动特效.

Installation - 安装

With CocoaPods, add this line to your Podfile.

使用 CocoaPods ,添加以下一行代码即可.

pod 'JTBorderDotAnimation', '~> 1.0'

Screenshots - 屏幕截图

Usage - 使用

Basic usage 基本使用

Just import JTBorderDotAnimation.h.

只需要引入头文件 JTBorderDotAnimation.h 即可.

#import "JTBorderDotAnimation.h"@interface ViewController : UIViewController @property (weak, nonatomic) IBOutlet UIView *animatedView; @property (strong, nonatomic) JTBorderDotAnimation *dotAnimation; @end

Assign the view you want to animate and start the animation.

给你想要做动画的view添加上,然后开始执行动画.

- (void)viewDidLoad
{[super viewDidLoad];self.dotAnimation = [JTBorderDotAnimation new];self.dotAnimation.animatedView = self.animatedView; } - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; [self.dotAnimation start]; }

Customization 可以定制的特性

You can easily customize the animation.

你可以很容易的定制以下的一些和动画相关的属性.

  • numberPoints
  • duration
  • repeatCount
  • pointSize
  • pointColor

Example:

例子:

- (void)viewDidLoad
{[super viewDidLoad];self.dotAnimation = [JTBorderDotAnimation new];self.dotAnimation.animatedView = self.animatedView; self.dotAnimation.numberPoints = 6; self.dotAnimation.duration = 6.; self.dotAnimation.repeatCount = 3; self.dotAnimation.pointSize = 5.; self.dotAnimation.pointColor = [UIColor orangeColor]; }

Notes 注意

clipsToBounds property of the animatedView is set to NO at the beginning of the animation.

clipsToBounds这个属性在动画开始的时候是被设置成NO的.

You can also change the speed of the animation without stopping it with:

你也可以在做动画的过程中即时修改动画的速度:

    CALayer *layer = self.animatedView.layer;layer.timeOffset = [layer convertTime:CACurrentMediaTime() fromLayer:nil];layer.beginTime = CACurrentMediaTime();layer.speed = 2.;

Requirements - 需要的环境

  • iOS 7 or higher iOS 7+
  • Automatic Reference Counting (ARC) ARC

Known Issues - 已知的问题

  • Animation stop when the application go in background, you have to restart it manually
  • 应用进入后台后,动画就会停止,你需要在进入前台后手动开启动画

Author - 作者

  • Jonathan Tribouharet (@johntribouharet)

License - 协议

JTBorderDotAnimation is released under the MIT license. See the LICENSE file for more info.

[翻译] JTBorderDotAnimation相关推荐

  1. Mysql函数group_concat、find_in_set 多值分隔字符字段进行数据库字段值翻译

    Mysql函数group_concat.find_in_set进行数据库字段值翻译 场景 配方表:记录包含的原料 sources表示原料,字段值之间用逗号分隔 原料表:对应原料id和原料名称 现需要查 ...

  2. “Attention is All You Need 翻译

    <p><img src="output_0_0.png" alt="png"></p> "Attention is ...

  3. 基于PyTorch的Seq2Seq翻译模型详细注释介绍(一)

    版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明. 本文链接:https://blog.csdn.net/qysh123/article/deta ...

  4. 全文翻译(全文合集):TVM: An Automated End-to-End Optimizing Compiler for Deep Learning

    全文翻译(全文合集):TVM: An Automated End-to-End Optimizing Compiler for Deep Learning 摘要 人们越来越需要将机器学习应用到各种各样 ...

  5. 全文翻译(四) TVM An Automated End-to-End Optimizing Compiler

    全文翻译(四) TVM An Automated End-to-End Optimizing Compiler 6.3 嵌入式GPU评估 对于移动GPU实验,在配备ARM Mali-T860MP4 G ...

  6. 全文翻译(三) TVM An Automated End-to-End Optimizing Compiler

    全文翻译(三) TVM An Automated End-to-End Optimizing Compiler 5. 自动化优化 考虑到一组丰富的调度原语,剩下的问题是为DL模型的每一层,找到最佳的算 ...

  7. 全文翻译(二): TVM: An Automated End-to-End Optimizing Compiler for Deep Learning

    全文翻译(二): TVM: An Automated End-to-End Optimizing Compiler for Deep Learning 3.优化计算图 计算图是在DL框架中表示程序的常 ...

  8. 全文翻译(一):TVM: An Automated End-to-End Optimizing Compiler for Deep Learning

    全文翻译(一):TVM: An Automated End-to-End Optimizing Compiler for Deep Learning 摘要 人们越来越需要将机器学习应用到各种各样的硬件 ...

  9. YOLOv4全文阅读(全文中文翻译)

    YOLOv4全文阅读(全文中文翻译) YOLOv4: Optimal Speed and Accuracy of Object Detection 论文链接: https://arxiv.org/pd ...

最新文章

  1. LINUX下GDB反汇编和调试
  2. 《Web前端开发精品课 HTML与CSS进阶教程》——1.4 id和class
  3. jupyter 安装目录Table of Contents
  4. 在cocos creator 中使用websocket
  5. 面向对象技术-设计模式的图
  6. 如何防止SQL注入 http://zhangzhaoaaa.iteye.com/blog/1975932
  7. 让步的人,最值得深交
  8. STM32学习之路-SysTick的应用(时间延迟)
  9. 元素隐式具有 “any” 类型,因为类型“Shared”没有索引签名问题解决思路
  10. Apache目录介绍
  11. 关于LINUX权限的一个题目
  12. 软件过程与项目管理第二周作业
  13. C++ 简单的SQL注入过滤
  14. 谈谈流计算中的『Exactly Once』特性
  15. Linux守护进程(init.d和xinetd)
  16. 数字信号处理实验(MATLAB)
  17. lodop php 快递单_Lodop打印模板 - 让Web打印易起来~~ – 基于ThinkPHP和Bootstrap的极速后台开发框架...
  18. 一级导航,二级导航,三级导航介绍
  19. Tiny 6410 K9GAG08U0E nand flash移植uboot
  20. python 自动识别图形验证码

热门文章

  1. 2:0!Dota2世界冠军OG被OpenAI碾压,全程人类只推掉两座外塔
  2. 马斯克圣诞节晒太空飞船:明年4月测试,5年后飞火星
  3. 用深度神经网络修复H漫:看完这篇你就能眼中无码
  4. 独家 | 李飞飞亲口跟我们说:离职Google是假新闻
  5. 丰田要建专属自动驾驶测试场,再也不用共享了
  6. 阿里投资小鹏汽车,是提速自动驾驶布局的开端吗?
  7. Facebook悄悄参加星际AI大赛,然后输了 | 中国团队夺得第四
  8. 本周学习小结(11/03 - 17/03)
  9. Xamarin自定义布局系列——PivotPage(多页面切换控件)
  10. 基于JT/T808 协议的GPS解析分享 C#