应用3D旋转到iPhone查看 [英] Apply 3D rotation to iPhone view

查看:186
本文介绍了应用3D旋转到iPhone查看的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想申请在iPhone视图(尤其是一个UILabel)三维旋转。什么是最简单的方法是什么?

I would like apply a 3D rotation on a view (in particular to a UILabel) in iPhone. What's the simplest way to do this?

一个code例如将大大AP preciated。

A code example will be much appreciated.

推荐答案

有关二维旋转使用:

//rotate label in 45 degrees
label.transform = CGAffineTransformMakeRotation( M_PI/4 );

有关3D变换看<一href="http://stackoverflow.com/questions/2301067/iphone-animation-why-does-rotating-a-uilabel-around-x-axis-cut-off-its-bottom-ha">this螺纹:

CATransform3D _3Dt = CATransform3DMakeRotation(radians(90.0f), 1.0, 0.0, 0.0);

这篇关于应用3D旋转到iPhone查看的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆