Swift 矢量动画框架 ShapeAnimation-Swift
- 授权协议: GPL
- 开发语言: Swift
- 操作系统: iOS
- 软件首页: http://git.oschina.net/rhcad/ShapeAnimation-Swift
- 软件文档: https://github.com/rhcad/ShapeAnimation-Swift
软件介绍
iOS上使用Swift实现的矢量图形动画框架,可动画绘图。
特点是可写少量代码实现常见的CoreAnimation层动画,利用闭包定制动画特性。
目前已支持下列动画函数:
-
opacityAnimation, flashAnimation 透明度、闪烁
-
scaleAnimation 放缩
-
rotate360Degrees, rotationAnimation 旋转
-
shakeAnimation 左右摇晃
-
moveAnimation, moveOnPathAnimation 沿路径移动
-
slideToRight 向右滑动
-
strokeEndAnimation 沿线描绘
strokeColorAnimation, lineWidthAnimation, dashPhaseAnimation 线条颜色、线宽动画,虚线动画可用于亮显选择
-
switchPathAnimation 切换图形
-
animationGroup 一个层多个动画同时进行
-
applyAnimations 多个层同步动画
该框架还在不断更新中,欢迎Fork、点赞,欢迎动手和提建议。
代码示例:
let layer1 = addLinesLayer(view, points:[(10.0,20.0),(150.0,40.0),(120.0,320.0)])
layer1.strokeEndAnimation().apply() {
layer1.shakeAnimation().apply()
}
let la2 = self.addLinesLayer(view, points:points2, color: UIColor.blueColor())
lla2.scaleAnimation(from:1, to:1.1, repeatCount:3).apply(duration:0.3)
let la3 = self.addLinesLayer(view, points:points3, color: UIColor.greenColor())
la3.flashAnimation(repeatCount:6).apply()
let la4 = addLinesLayer(view, points:[(10.0,20.0), (150.0,40.0), (120.0,120.0)])
let a1 = la4.moveOnPathAnimation(path).set {$0.duration=1.6}
let a2 = la4.rotate360Degrees().set {$0.repeatCount=2}
animationGroup([a1, a2]).set {$0.autoreverses=true}.apply()
Kotlin程序员面试算法宝典
孙伟、楚秦 / 机械工业出版社 / 2018-12 / 69
本书是一本讲解程序员面试笔试算法的书籍。在写法上,除了讲解如何解答算法问题以外,还引入了例子辅以说明,以便读者能够更加容易地理解。 本书将程序员面试笔试过程中的各类算法类真题一网打尽。在题目的广度上,通过各种渠道,搜集了近3年来几乎所有IT企业面试笔试算法高频题目,所选择题目均为企业招聘使用题目;在题目的深度上,本书由浅入深、庖丁解牛式地分析每一个题目,并提炼归纳,同时,引入例子与源代码、时......一起来看看 《Kotlin程序员面试算法宝典》 这本书的介绍吧!
