iOS 跷跷板动画 Seesaw Animation
2024-09-08 12:34:10
Xcode Playgound示例代码:
let testView = UIView()
testView.frame = CGRect.init(x: , y: , width: , height: )
self.view.addSubview(testView)
testView.backgroundColor = UIColor.red var trans = CATransform3DIdentity
trans.m34 = -1.0 /
trans = CATransform3DRotate(trans, CGFloat.pi / , , , )
UIView.animate(withDuration: , animations: {
testView.layer.transform = trans
}) { (finish) in
UIView.animate(withDuration: , animations: {
testView.layer.transform = CATransform3DIdentity
})
}
Ficow原创,转载请注明出处:http://www.cnblogs.com/ficow/p/8227709.html
最新文章
- 读书笔记--SQL必知必会--Tips
- Spell-DBC
- 《JavaScript高级程序设计》学习笔记(4)——引用类型
- SQL Server 2008 修改表所有者,架构
- top命令结果参数注解
- CreateJSのeasel.js(一)
- Unity3D中Update和Lateupdate的区别
- MySQL索引的缺点以及MySQL索引在实际操作中有哪些事项
- 如何利用log4Net自定义属性配置功能记录完整的日志信息
- Table of Contents - Ehcache
- Android录音服务
- The 2014 ACMICPC Asia Regional Beijing Online
- Python--my first try!
- springboot(十九):使用Spring Boot Actuator监控应用
- POSIX 消息队列相关问题
- Qwt 编译 配置 使用
- JS_高程3.基本概念(1)
- 使用datepicker日期插件
- sql server 使用链接服务器连接Oracle,openquery查询数据
- BZOJ5289 HNOI/AHOI2018排列(贪心+堆)