5

I have an attributed string which I am making out of HTML using DTCoreText, and I want to set it as the value of my UILabel. However, I want to check at a later point if the value of the string has changed, in comparison to the UILabel. Is it possible to set both the UILabel's text and attributedText properties? Will the attributedText simply overshadow the text property, so the text property can be kept as an internal value?

4

1 回答 1

1

根据文档,分配给text替换attributedText具有相同的内容(尽管作为无样式的属性字符串),并分配给attributedText替换text具有相同的内容(没有任何格式信息)。

如果要将任意信息附加到 obj-c 对象,则应使用关联对象

于 2013-02-07T21:24:59.467 回答