插值:手势驱动动画的快速插值

时间:2021-02-03 17:03:53
【文件属性】:
文件名称:插值:手势驱动动画的快速插值
文件大小:721KB
文件格式:ZIP
更新时间:2021-02-03 17:03:53
swift ios interactive animation interpolation 插 Interpolate是强大的Swift插值框架,用于创建交互式手势驱动的动画。 用法 的 :key: 插值的思想是-所有动画都是对值进行时间插值。 要使用插值: 在您的Swift文件顶部导入Interpolate。 import Interpolate 创建一个插值对象,该插值对象具有一个from值,一个to值以及一个Apply闭包,该闭包将插值的结果应用于目标对象。 let colorChange = Interpolate ( from : UIColor. white , to : UIColor. red , apply : { [ weak self ] (color) in self ? . view . backgroundColor = color }) 或者,您可以为数组中的插值指定多个值。 Swift编译器可能在推断数组类型时遇到问题,因此最好是明确的。 let colors : [UIColor] = [UIColor. white , UIColor. red , UIColor. green ] let colorChange =
【文件预览】:
Interpolate-master
----Interpolate()
--------Interpolate.h(521B)
--------Info-tvOS.plist(784B)
--------Info.plist(784B)
--------Interpolate.swift(6KB)
--------SpringInterpolation.swift(3KB)
--------BasicInterpolation.swift(1KB)
--------Interpolatable.swift(7KB)
----build.sh(1KB)
----InterpolateTests()
--------InterpolateTests.swift(3KB)
--------Info.plist(736B)
--------InterpolatableTests.swift(2KB)
----Interpolate.podspec(2KB)
----examples()
--------Animations()
----.travis.yml(302B)
----LICENSE(1KB)
----README.md(5KB)
----Package.swift(718B)
----Interpolate.xcodeproj()
--------xcshareddata()
--------project.xcworkspace()
--------project.pbxproj(23KB)
----.gitignore(1KB)
----CHANGELOG.md(959B)

网友评论