In my app, i will get a html string in the format of
<p style = "text-align: center;"><strong>"some text in here</strong></p>
I know how to convert this html string to an attributedString using the following function.
[[NSAttributedString alloc] initWithData:[aboutData dataUsingEncoding:NSUTF8StringEncoding] options:@{NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType, NSCharacterEncodingDocumentAttribute: [NSNumber numberWithInt:NSUTF8StringEncoding]} documentAttributes:nil error:nil];
But the problem is, i wish to retain the all the attributes of the attained AttributedString, but be able to change either font size, font family and paragraph style of this attained attributedString.
For example, if i attain a bold attributedString from this html, how can I change the font size or font family of this particular string without changing its bold state?
How do i do that?
Thanks!