【发布时间】:2017-09-17 18:32:18
【问题描述】:
我的 UILabel 的 AttributedText 渲染时没有属性
var labelText = new NSMutableAttributedString(cell.MessageLabel.Text, underlineStyle: NSUnderlineStyle.ByWord);
foreach (ErrorJson error in messages[indexPath.Section].ErrorsData[indexPath.Row].errorsData.errors)
{
labelText.AddAttribute(CTStringAttributeKey.ForegroundColor, UIColor.FromRGB(255, 230, 58), new NSRange(error.offset, error.length));
labelText.AddAttribute(CTStringAttributeKey.UnderlineColor, UIColor.FromRGB(255, 230, 58), new NSRange(error.offset, error.length));
}
cell.MessageLabel.AttributedText = labelText;
我做错了什么?
谢谢:)
【问题讨论】:
标签: xamarin.ios uilabel nsattributedstring