In Objective-C, I have a UILabel that says "Download." Every 0.5 seconds a line will get another '.' until there are 3 points, then it will start. The problem I am facing is that my line is centered, and when each point appears, the line jumps. The reason that line skipping occurs is because UILabel continues to trim right spaces.
Here is an example of what is happening at the moment.
+------------+ | Loading | +------------+ | Loading. | +------------+ | Loading.. | +------------+ | Loading... | +------------+
And that is what I want.
+------------+ | Loading | +------------+ | Loading. | +------------+ | Loading.. | +------------+ | Loading... | +------------+
Pointing the UILabel to wide and left justified is not an option. This needs to be done with the text.
I found a link, but I still can not figure it out.
What I have now is this.
[NSString stringWithFormat:@"%-3.3s", [@"" UTF8String]]; [NSString stringWithFormat:@"%-3.3s", [@"." UTF8String]]; [NSString stringWithFormat:@"%-3.3s", [@".." UTF8String]]; @"...";
source share