How Can I indent only first line of multiline UILabel in iOS?

ios, ios7, objective-c, uilabel

Solution

@DavidCaunt suggestion worked for me. I am sharing code here.

NSMutableParagraphStyle *style = [[NSMutableParagraphStyle alloc] init];
style.firstLineHeadIndent = 50;

[attributedText addAttribute:NSParagraphStyleAttributeName value:style range:range];

[valueLabel setAttributedText:attributedText];

Problem

I want to add an image in start of UILabel. Label is multiline. If I use contentInset, it indent the whole label but I want to indent first line only. I have tried this so far, this doesn't work for me. ``` UIEdgeInsets titleInsets = UIEdgeInsetsMake(0.0, 40.0, 0.0, 0.0); valueLabel.contentInset = titleInsets; ``` It should look like this.

Original source