I have 1 attributed string with multiple paragraph.
I had given the FirstLineHeadIndent = 2.12.
Now I want to give the FirstLineHeadIndent=0
to 1st paragraph
and FirstLineHeadIndent=2
to 2nd paragraph in the attributed string.
If I set the property like
NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
paragraphStyle.lineSpacing =Line_space;
paragraphStyle.firstLineHeadIndent =2;
paragraphStyle.headIndent =margin_space;
paragraphStyle.tailIndent =-margin_space;
paragraphStyle.paragraphSpacing=paragraph_space;
NSDictionary *ats = @{
NSFontAttributeName : [UIFont fontWithName:self.bookView.defaultFontFamily size:self.bookView.defaultFontSize],
NSParagraphStyleAttributeName : paragraphStyle,
};
It will give the head space to both the paragaraph.
Please help me.
I am uploading the image for more help:-