I have an NStextView that loads a description from a JSON source. The NSTextView loads a different string every time the user clicks a button. These descriptions sometimes have a URL in them which is rendered as plain text and not as a clickable URL. It loads just fine, it’s just that URL’s aren’t recognized. I’ve set up automatic link detection to no avail. I also tried AttributedString which didn’t work, but that may be my incompetence (new to this.)
Here’s the code:
if ([firstCommenter isEqualToString:playerID]) {
NSString *commentBody = [[allComments objectAtIndex:0] valueForKeyPath:@"body"];
[shotDescriptionTextView setString:commentBody];
}
Refer Automatic Link Detection in an NSTextView. Hope helpful