The ASTextNode didn't apply the link color and underline style with NSUnderlineStyleNone. It's aways keep blue color and have underline. It's that I miss some thing?
NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"user://%@",u[@"objectId"]]];
[body addAttributes:@{
NSForegroundColorAttributeName:kAtNameColor,
NSLinkAttributeName:url,
NSUnderlineStyleAttributeName:@(NSUnderlineStyleNone)
} range:range];
@levi, could you check this out since you've been in ASTextNode recently? Make sure we don't break ASDK link handling with the CK renderer...
Interesting. I'll check this out this week.
Any update on this? I'm having the same problem when using the default NSLinkAttributeName attribute. This was partially mentioned in #571 and the Kittens example was referenced, but in that example it's using a custom link attribute name instead of the default NSLinkAttributeName. I tried digging around in the text kit code, but I could only find where its handling touches. How are NSLinkAttributeName links being detected and colored? NSLayoutManager NSTextStorage?
@freeant @bsmith11 - could you try this out on the latest master and let me know if it works? I believe there are some changes that may have resolved this, but I haven't had time to try it myself yet.
@freeant @bsmith11: thanks for contributing to the AsyncDisplayKit community by reporting this bug. Due to the length of time it鈥檚 been since this thread was active and the fact that I believe this has been resolved on master since then, I鈥檓 going to mark this issue as closed. If you are still having troubles, feel free to reopen it. I hope you have been able to use the framework!
I Have the same issue. When apply an color in Text Link the text appears with color, but underline with blue. When try set [NSUnderlineStyleAttributeName: NSUnderlineStyle.StyleNone.rawValue] this is ignored and blue underline don't disappear.
These link colors are being added by the underlying TextKit objects, we aren't doing this processing. I'm surprised it is overriding your specification though.
What happens if you use NSUnderlineColorAttributeName and use a different color? Does it pick that up?
Hi @ocrickard. Yes NSUnderlineColorAttributeName work's fine. But i need remove the underline. I've make a workaround with UIColor.clearColor() because NSUnderlineStyleAttributeName is not working. Thanks.
Cool, sadly if TextKit is adding the underline and overriding that value doesn't fix it then there is little we can do here besides file a radar.
Most helpful comment
These link colors are being added by the underlying TextKit objects, we aren't doing this processing. I'm surprised it is overriding your specification though.
What happens if you use NSUnderlineColorAttributeName and use a different color? Does it pick that up?