0
我使用庫AutoScrollLabel
爲autoScrollLabel
類似跑馬燈,它的工作完美,當我需要從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"];
檢查此.. http://stackoverflow.com/questions/22397122/how-to-move-text-from-right-to-left-in-ios-programatically –
@KiritModi謝謝,但thi s不是我需要做的 – Houssam