iOS 动画 SpringAnimationCALayer
- 授权协议: MIT
- 开发语言: Swift
- 操作系统: OS X
- 软件首页: https://github.com/evgenyneu/SpringAnimationCALayer
软件介绍
SpringAnimationCALayer 是利用 CALayer 制作弹簧动画效果的一个辅助函数。
使用示例:
复制 SpringAnimation.swift 文件到你的项目。
调用
SpringAnimation.animate函数,绘制 CALayer 的性质。
例如,让一个层绕其X轴翻转:
var transform = CATransform3DIdentity transform.m34 = -1.0/100.0 myCALayer.transform = CATransform3DRotate(transform, CGFloat(M_PI), 1, 0, 0) SpringAnimation.animate(myCALayer, keypath: "transform.rotation.x", duration: 2.0, usingSpringWithDamping: 0.7, initialSpringVelocity: 1.8, fromValue: 0, toValue: Double(M_PI), onFinished: nil)
目前动画类似于 UIView 的方法. 但是 duration, usingSpringWithDamping 和 initialSpringVelocity 的值与那些从 UIView 的方法得到的不同。
One Click
Richard L. Brandt / Portfolio Hardcover / 2011-10-27 / 25.95
An insightful look at how Amazon really works and how its founder and CEO makes it happen. Amazon's business model is deceptively simple: make online shopping so easy and convenient that customers ......一起来看看 《One Click》 这本书的介绍吧!
