问题描述:

I have a UILabel set in storyboard with Lines=0 and stretched big enough for 2 or 3 lines.

But when I run, and I set UILabel to a sentence of text, it injects a line feed after each of the first few words.

I set .text = "GPS 37.664051,-121.910774"

but it then displays as:

GPS

37.6640

43,-121.9

10789

My UILabel is stretched across the screen horizontally, and stretched vertically to obviously allow up to 4 lines.

Init:

self.loggedInLabel.text = @"RUNNING";

self.loggedInLabel.lineBreakMode = NSLineBreakByWordWrapping;

[self.loggedInLabel sizeToFit];

相关阅读:
Top