问题标签 [ohattributedlabel]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
139 浏览

ios - 行间距在 OHAttributedLabel 中不起作用

这是代码:

标签是:

代替:

编辑:标签有足够的空间将文本放在 1 行中,但我仍然想插入断线(以编程方式!)

0 投票
2 回答
2262 浏览

swift - 如何在 Swift 中的 TTTAttributedLabel、OHAttributedLabel 或 SETextView 上设置“NSBackgroundColorAttributeName”

我正在尝试将NSBackgroundColorAttributeName属性设置为TTTAttributedLabel,OHAttributedLabelSETextView,但它不起作用。有人知道吗?示例代码如下。

另外,我可以NSForegroundColorAttributeName在每一个上label正确设置“”。