Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NSString * htmlString = @" <p><b>Hey</b> you. My <b>name </b> is <h1> Joe </h1></p> ";
- NSAttributedString * attrStr = [[NSAttributedString alloc] initWithData:[htmlString dataUsingEncoding:NSUnicodeStringEncoding] options:@{ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType } documentAttributes:nil error:nil];
- UILabel * myLabel = [UILabel alloc] init];
- myLabel.attributedText = attrStr;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement