iphone - 如何在 ios 中调整 uilabel

标签 iphone ios uilabel

<分区>

我正在创建一个 iPhone 应用程序。在该应用程序中,我想根据随附的屏幕截图调整标签的角度。 enter image description here (见 120 美元的标签)

红色图像在背景中,我想倾斜它的 uilabel 顶部

我使用了transform方法来旋转。但它没有正确地倾斜它。标签收缩

testLabel.transform = CGAffineTransformMakeRotation(30 * M_PI / 180.0);

最佳答案

尝试这样的事情:

label.transform = CGAffineTransformMakeRotation(M_PI / 4); //  45 degree rotation 

关于iphone - 如何在 ios 中调整 uilabel,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17522666/

相关文章:

ios - iPhone 应用程序设置只读值

ios - 没有 subview 时更新 uilabel 的宽度

ios - 从 UILabel 更改 LineBreak 字符

iphone - 动态更改单元格高度时 UITableView 的不自然 SCSS

iphone - Maya 的 iPhone 开发图形

iphone - Xcode源码自动格式化

ios - Cocoa 编程的概念或技术问题

iphone - iOS 视频通话库

ios - 当键盘处于事件状态时居中 UIActivityIndi​​cator

ios - 我想将单选按钮方法与 swift 中的选择器语句连接起来