I have a UILabel acting like a ticker, so every 0.09 seconds the text changes, but when the space goes at the end of the mark, it is clipped, so it looks like the ticker is behind.
Here is the code:
[self setTickerLabel: [ [UILabel alloc] initWithFrame:CGRectMake(0, self.view.bounds.size.height - 40, self.view.bounds.size.width, 40)]];
[self.tickerLabel setFont:[UIFont fontWithName:@"Courier" size:TICKER_FONT_SIZE]];
self.text =[NSString stringWithFormat:@"%@",self.result];
self.tickerLabel.textAlignment = NSTextAlignmentRight;
[self.tickerLabel setText:self.text];
[self.tickerLabel setLineBreakMode:NSLineBreakByWordWrapping];
[NSTimer scheduledTimerWithTimeInterval:TICKER_RATE target:self selector: @selector(nudgeTicker:) userInfo:nil repeats:YES];
[self.view addSubview:self.tickerLabel];
The Nudge ticker method does the following:
NSString* firstLetter = [self.text substringWithRange: NSMakeRange(0,1)];
NSString* remainder = [self.text substringWithRange:NSMakeRange(1,[self.text length]-1)];
self.text=[remainder stringByAppendingString: firstLetter];
self.tickerLabel.text=self.text;
I really need some help. How can i fix this? By the way, the text of UILabel is written in Arabic.
source
share