Advertisement
Guest User

Untitled

a guest
May 24th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. NSString * htmlString = @" <p><b>Hey</b> you. My <b>name </b> is <h1> Joe </h1></p> ";
  2. NSAttributedString * attrStr = [[NSAttributedString alloc] initWithData:[htmlString dataUsingEncoding:NSUnicodeStringEncoding] options:@{ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType } documentAttributes:nil error:nil];
  3. UILabel * myLabel = [UILabel alloc] init];
  4. myLabel.attributedText = attrStr;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement