我为https://github.com/TTTAttributedLabel/TTTAttributedLabel使用了 Xamarin 绑定
并按照 - 在 UILabel.attributedText *not* 蓝色和 *not* 下划线中创建链接
self.label.linkAttributes = @{NSForegroundColorAttributeName: color,
NSUnderlineStyleAttributeName: @(NSUnderlineStyleNone)};
我想设置我的链接属性,我只是不确定语法 -
我已经尝试过这些变化 -
label.LinkAttributes = new NSDictionary(
new NSString("NSForegroundColorAttributeName"), UIColor.Red,
new NSString("NSUnderlineStyleAttributeName"), new NSUnderlineStyle() == NSUnderlineStyle.Double);
label.LinkAttributes = new NSDictionary(
new NSString("NSForegroundColorAttributeName"), UIColor.Red,
new NSString("NSUnderlineStyleAttributeName"), new NSNumber(2));
但不工作。不确定如何传入 UIColor ,因为它看不到它的可用类型,它正在做“某事”,因为它用这段代码擦除了我的下划线+蓝色。