I am using Quartz for cell rendering in my table views. It works nice, but to meet design concept I must somehow find the way to adjust line heights of the multiline text.
At the moment I am using convenient UIKit additions to NSString to render the text:
– drawInRect:withFont:lineBreakMode:alignment:
However, I can not find anywhere it the documentation the way to set up line spacing.
UIWebView is capable of that so it must use some lower level API to calculate line-height CSS property.
Can you recommend the solution compatible with iOS 3.0, 3.1?
I know I could try to use Core Text but it is available from the iOS 3.2.
I think the short answer here is no. I’ve worked with this problem for a while, and had to eventually implement my own solution for a label. I’ll post this solution below. Hopefully it’s helpful in implementing something yourself. Excuse the length and number of files, I broke it down for testability, and it handles ellipsizing as well.