草庐IT

attributedActorString

全部标签

swift - 设置 NSUnderlineStyle 导致无法识别的选择器异常

我正在尝试使用NSAttributed字符串为字符串加下划线。出于某种原因,我的台词导致了异常:-[_SwiftValue_getValue:forType:]:unrecognizedselectorsenttoinstance结果应该用于UITableView中的UILabel,并根据需要创建。这是代码:attributedString=NSMutableAttributedString(string:message)ifletactor=event.actor{letattributes=[NSUnderlineStyleAttributeName:NSUnderlineStyl

swift - 设置 NSUnderlineStyle 导致无法识别的选择器异常

我正在尝试使用NSAttributed字符串为字符串加下划线。出于某种原因,我的台词导致了异常:-[_SwiftValue_getValue:forType:]:unrecognizedselectorsenttoinstance结果应该用于UITableView中的UILabel,并根据需要创建。这是代码:attributedString=NSMutableAttributedString(string:message)ifletactor=event.actor{letattributes=[NSUnderlineStyleAttributeName:NSUnderlineStyl