Closed mjspawn closed 11 years ago
i figure it out using {.spec = kCTParagraphStyleSpecifierMinimumLineSpacing,.valueSize = sizeof(CGFloat), .value = (const void)&lineSpacing}, {.spec = kCTParagraphStyleSpecifierMaximumLineSpacing,.valueSize = sizeof(CGFloat), .value = (const void)&lineSpacing}
You should use the new OHParagraphStyle
for that (that I added in the latest versions), it is a wrapper around CTParagraphStyle
that is easier to use than the CTParagraphStyle
C structures. See my demo project, I demonstrate it already.
_By the way, to be frank I didn't understand your question as:
why padding not the same?I use \n to line break and ohLabel.lineBreakMode = NSLineBreakByWordWrapping; ohLabel.attributedText = [OHASBasicHTMLParser attributedStringByProcessingMarkupInAttributedString:cell.ohLabel.attributedText];