iPhone:横向模式下标签中数字的垂直对齐方式

时间:2011-06-17 09:39:21

标签: iphone uilabel vertical-alignment

我正在尝试将标签文本与我的iPhone应用程序Timer垂直对齐。基本上它是一个游戏应用程序和计时器值以横向模式标签中的MM:SS格式显示。当我添加标签并尝试设置此值时,它看起来像图像1不正确。我从许多线程中发现,您可以设置多行并将标签宽度设置为一个char,但它看起来像图像2也是错误的。我希望我的计时器值显示为图像3.有人可以告诉我如何才能实现它?

感谢。

[添加了我想要做的真实照片]

enter image description here

The timer in land scape mode....not correct

The timer when I set multiple lines for each digit...

I want this is to happen...

1 个答案:

答案 0 :(得分:1)

试试这个

    CGAffineTransform transform=CGAffineTransformMakeRotation(300);//change angle according.
    transform=CGAffineTransformMakeRotation(-300);//change angle according.
    lbl.transform=transform;