【发布时间】:2013-01-10 11:58:14
【问题描述】:
我有 UILabel 视图,我想以固定的持续时间将文本从右到左水平移动。我是新手,请帮助!谢谢!
【问题讨论】:
-
你的意思是像股票标签一样吗?
标签: objective-c ios5 xcode4.2
我有 UILabel 视图,我想以固定的持续时间将文本从右到左水平移动。我是新手,请帮助!谢谢!
【问题讨论】:
标签: objective-c ios5 xcode4.2
这样的东西应该可以正常工作:
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];
【讨论】: