How can we set line spacing or line height on NSMutableAttributedString. I have tried with
NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle defaultParagraphStyle] mutableCopy];
[paragraphStyle setLineSpacing:150] ;
paragraphStyle.minimumLineHeight = 150;
[self addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, self.length)];
with No luck.
any suggestion would be much appreciated.
Thanks
You need to set paragraphStyle.maximumLineHeight
.
I hope it will help!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With