2014-07-23 89 views
0

我使用库AutoScrollLabelautoScrollLabel类似跑马灯,它的工作完美,当我需要从label滚动从左到右。IOS自动滚动标签从右到左滚动

但是,当我必须从正确的使用方向走了,我也面临这个问题:

标签从最后一个字开始的第一?

为什么?

您可以在下面找到我的代码:

self.autoScrollLabel.textColor = [UIColor whiteColor]; 
self.autoScrollLabel.labelSpacing = 1; // distance between start and end labels 
self.autoScrollLabel.pauseInterval = 0; 
self.autoScrollLabel.scrollSpeed = 70; // pixels per second 
self.autoScrollLabel.textAlignment = NSTextAlignmentCenter; 
self.autoScrollLabel.fadeLength = 0; 
self.autoScrollLabel.scrollDirection = CBAutoScrollDirectionRight; 
self.autoScrollLabel.text = [NSString stringWithFormat:@"%@%@",@"",@"hello hello1 hello1 heeloo3 hello3 hebe hehehe hgdghdhg he e e hehee hehee hehehehehehhe"]; 
+0

检查此.. http://stackoverflow.com/questions/22397122/how-to-move-text-from-right-to-left-in-ios-programatically –

+0

@KiritModi谢谢,但thi s不是我需要做的 – Houssam

回答

0

我从来没有用过AutoScrollLabel类,但我认为,为了一切正常,当你滚动到你应该改变属性

self.autoScrollLabel.scrollDirection = CBAutoScrollDirectionLeft