views:

430

answers:

1

Hi,

I have a multiline UILabel that can take a maximum of 3 lines. i.e message.numberOfLines = 3;

Everything works fine, but how can I set the vertical gap between the lines? e.g between line 1 and line 2 etc?

Please enlight, Tee

+2  A: 

I haven't been able to find a way to adjust the spacing between lines. The font property of UILabel has a number of read-only properties, so that won't help.

I've resorted to draw my own text if I want to change the line spacing. I use NSString's -drawAtPoint and -drawInRect and use one or more of the -sizeWithFont methods to figure out how long the text will be in order to split the text and draw the right number of words or characters per line.

mahboudz
Thanks, would you mind adding some example code ?
Pierre Valade