CATransform3D中m34值的测试

时间:2016-08-07 08:05:25
【文件属性】:
文件名称:CATransform3D中m34值的测试
文件大小:381KB
文件格式:ZIP
更新时间:2016-08-07 08:05:25
Transform3D m34 透视 CATransform3D中m34值的设定一直不太理解。工作中用到就好好学习了下。原来m34值必须是在 在绕x轴旋转或y轴旋转后,才会有效果,否则是看不出效果的。 而且如下,m34的设置必须在旋转之前才有效。例子很简单,象试一下的可下载看一下。 CATransform3D transform2 = CATransform3DIdentity; //.m行一定要写在CATransform3DRotate的前面! transform2.m34 = -1/2000.0; // 透视效果 transform2 = CATransform3DRotate(transform2,(M_PI/180*50), 0, 1, 0); [m34View.layer setTransform:transform2];
【文件预览】:
TestM34
----TestM34()
--------main.m(209B)
--------TestM34-Info.plist(1KB)
--------ViewController.m(2KB)
--------AppDelegate.h(229B)
--------resources()
--------TestM34-Prefix.pch(317B)
--------Default@2x.png(16KB)
--------AppDelegate.m(485B)
--------Default.png(6KB)
--------Default-568h@2x.png(18KB)
--------ViewController.h(78B)
--------en.lproj()
----TestM34.xcodeproj()
--------project.xcworkspace()
--------project.pbxproj(13KB)
--------xcuserdata()

网友评论

  • 代码不多,简单易懂