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 的方法得到的不同。
Learn Python the Hard Way
Zed Shaw / Example Product Manufacturer / 2011
This is a very beginner book for people who want to learn to code. If you can already code then the book will probably drive you insane. It's intended for people who have no coding chops to build up t......一起来看看 《Learn Python the Hard Way》 这本书的介绍吧!
