以一定角度显示文本

Lil*_*oke 1 iphone cocoa-touch ipad ios

我正在为iPad/iPhone编写一个应用程序,我正在寻找一个关于如何使用xCode在iPhone和iPad上以任意角度显示文本的建议?

感谢您的建议.

最好,托尼

Noa*_*oon 11

您可以设置transform任何属性,UIView例如,在这种情况下,UILabel调整其旋转,以及许多其他事项.例如:

myLabel.transform = CGAffineTransformMakeRotation(30 * M_PI / 180.0);
Run Code Online (Sandbox Code Playgroud)

将您的标签旋转30度.