let truncatedStringColour = [ NSForegroundcolorAttributename: UIcolor(red: 142.0/255.0,green: 59.0/255.0,blue: 84.0/255.0,Alpha: 1.0),NSFontAttributename: UIFont(name: "DINRoundOT",size: 17.0)!,NSlinkAttributename : "link"]truncatedString = NSAttributedString(string: "...more",attributes: truncatedStringColour)if let truncatStr = truncatedString { cell.lblDescription.attributedTruncationToken = truncatStr}解决方法 Docs说:
TTTAttributedLabel
can display both plain and attributed text: just pass anNsstring
orNSAttributedString
to thesetText:
setter. Never assign to theattributedText
property.
要解决此问题,请设置标签的文本属性而不是属性Text属性.
检查这个answer
您可以使用this来帮助您.
总结以上是内存溢出为你收集整理的ios – TTTAttributedLabel截断文本问题全部内容,希望文章能够帮你解决ios – TTTAttributedLabel截断文本问题所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)