如何水平和垂直滚动文本?目标C.

时间:2013-01-10 11:58:14

标签: objective-c ios5 xcode4.2

我有UILabel视图,我希望将文本水平移动到左侧固定持续时间。我是一个新手帮助!谢谢!

1 个答案:

答案 0 :(得分:0)

这样的事应该可以正常工作:

CGPoint center = scrollLabel.center;
[UILabel beginAnimations:@"scroll" context:nil];
[UILabel setAnimationDuration:5.0]; // the time the animation should take
center.x -= 500; // whatever distance you'd like
[UILabel commitAnimations];