• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSAttributedString has initWithHTML method
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSAttributedString has initWithHTML method


  • Subject: NSAttributedString has initWithHTML method
  • From: Darin Duphorne <email@hidden>
  • Date: Wed, 23 Jan 2002 19:23:42 -0600

Wow! NSAttributedString Class Cluster Additions provides an initWithHTML method to NSAttributedString.
Maybe this is the answer to my HTML Editor problem. But, can anyone tell me why this crashes? It looks pretty straightforward.

@implementation controller

- (IBAction)doit:(id)sender
{
NSAttributedString *attrStr;
NSString *htmlString;

htmlString=@"<html><head></head><body><u>underlined </u><i>italics</i></body>
</html>";

[attrStr initWithHTML:[htmlString dataUsingEncoding:NSASCIIStringEncoding]
documentAttributes:NULL];

[textField lockFocus];
[attrStr drawAtPoint:NSMakePoint(0.0, 0.0)];
}

@end


  • Prev by Date: Re: message to nil? (very basic question)
  • Next by Date: Contextual menu w/o right click?
  • Previous by thread: Re: Perl
  • Next by thread: Re: NSAttributedString has initWithHTML method
  • Index(es):
    • Date
    • Thread