I'm trying to stick an attributed string into my NSTextView, but it's just showing as plain text, no attributes. I created my string like so:
NSString *str = @"Parsing Directory Structure\n\n";
NSMutableAttributedString *attrstr = [[NSMutableAttributedString alloc] initWithString:str];
NSDictionary *attributes = @{
NSForegroundColorAttributeName : [NSColor blueColor],
NSFontAttributeName : [NSFont fontWithName:@"HelveticaNeue-Bold" size:20.f]
};
[attrstr setAttributes:attributes range:NSRangeFromString(str)];
[[self.textView textStorage] appendAttributedString:attrstr];
and on the NSTextView (inside the scrolling view) I've got the "Allows Rich Text" box checked still, and the Editable box unchecked. I'm basically trying to use this like a console output window.